Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-5817] Swift CMake prints "Building Swift standard library and SDK overlays" and "Building Swift runtime", even when those are *not* being built #48387

Closed
modocache mannequin opened this issue Sep 1, 2017 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. cmake good first issue Good for newcomers

Comments

@modocache
Copy link
Mannequin

modocache mannequin commented Sep 1, 2017

Previous ID SR-5817
Radar None
Original Reporter @modocache
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Project Infrastructure
Labels Bug, CMake, StarterBug
Assignee None
Priority Medium

md5: e3a6dd6c80b11e84ee6fe96250c68658

Issue Description:

Using the following project layout:

~/local/Source/apple/standalone/
    swift-cmark        # A directory containing the apple/swift-cmark source code
    swift-llvm/        # A directory containing the apple/swift-llvm source code
    clang/             # A directory containing the apple/swift-clang source code
    swift/             # A directory containing the apple/swift source code
    swift-cmark-build/ # A directory with an apple/swift-cmark build
    swift-llvm-build/  # A directory with an apple/swift-llvm build
    swift-build/       # An empty directory

If I run the following CMake command:

cmake \
    -H$HOME/local/Source/apple/standalone/swift \
    -B$HOME/local/Source/apple/standalone/swift-build \
    -G Ninja \
    -DCMAKE_BUILD_TYPE="Release" \
    -DSWIFT_PATH_TO_CMARK_SOURCE=$HOME/local/Source/apple/standalone/swift-cmark \
    -DSWIFT_PATH_TO_CMARK_BUILD=$HOME/local/Source/apple/standalone/swift-cmark-build \
    -DSWIFT_PATH_TO_LLVM_SOURCE=$HOME/local/Source/apple/standalone/swift-llvm \
    -DSWIFT_PATH_TO_LLVM_BUILD=$HOME/local/Source/apple/standalone/swift-llvm-build \
    -DSWIFT_PATH_TO_CLANG_SOURCE=$HOME/local/Source/apple/standalone/clang \
    -DSWIFT_PATH_TO_CLANG_BUILD=$HOME/local/Source/apple/standalone/swift-llvm-build \
    -DSWIFT_INCLUDE_DOCS=FALSE \
    -DSWIFT_BUILD_REMOTE_MIRROR=FALSE \
    -DSWIFT_BUILD_DYNAMIC_STDLIB=FALSE \
    -DSWIFT_BUILD_STATIC_STDLIB=FALSE \
    -DSWIFT_BUILD_DYNAMIC_SDK_OVERLAY=FALSE \
    -DSWIFT_BUILD_STATIC_SDK_OVERLAY=FALSE \
    -DSWIFT_BUILD_PERF_TESTSUITE=FALSE \
    -DSWIFT_INCLUDE_TESTS=FALSE

...then the CMake configuration step outputs the following:

-- Building Swift standard library and SDK overlays for SDKs: OSX
-- Build type: Release
-- Assertions: OFF
--
-- Building Swift runtime with:
-- Leak Detection Checker Entrypoints: OFF

However, this is not true; if I invoke ninja, it will not build the Swift standard library, SDK overlays, or runtime.

I believe this same bug can be reproduced by invoking the build script in the following way:

utils/build-script \
    --release \
    --build-swift-dynamic-stdlib=0 \
    --build-swift-static-stdlib=0 \
    --build-swift-dynamic-sdk-overlay=0 \
    --build-swift-static-sdk-overlay=0 \
    --skip-build-benchmarks

I think the solution here would be to not print the above statements, or to print something different, if the CMake variable SWIFT_BUILD_STDLIB is set to FALSE in swift/CMakeLists.txt.

@swift-ci
Copy link
Collaborator

swift-ci commented Oct 1, 2017

Comment by Manav Rathi (JIRA)

#12205

@modocache
Copy link
Mannequin Author

modocache mannequin commented Oct 3, 2017

Excellent, thank you!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. cmake good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant