-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[build-script] Move --native-{clang,llvm,swift}-tools-path flags into the Python build-script #34437
Conversation
set(CMAKE_CXX_COMPILER "${SWIFT_NATIVE_LLVM_TOOLS_PATH}/clang-cl") | ||
set(CMAKE_C_COMPILER "${SWIFT_NATIVE_LLVM_TOOLS_PATH}/clang-cl") | ||
set(CMAKE_CXX_COMPILER "${SWIFT_NATIVE_CLANG_TOOLS_PATH}/clang-cl") | ||
set(CMAKE_C_COMPILER "${SWIFT_NATIVE_CLANG_TOOLS_PATH}/clang-cl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously this means those currently passing in these flags and giving a different LLVM path than the clang path may now have to change their flag, but since these flags were never documented in the build-script help till now, that's probably just @compnerd and me.
… the Python build-script Also, fix two places where the LLVM path was wrongly employed to set up clang, and use the Swift path in install_toolchain_path().
57d624e
to
9ed6766
Compare
I want to play with this change a bit, but, from a quick look, I really like this idea. A +1 on the idea at the very least. If @gottesmm beats me to the review, that's fine, don't hold this up on my behalf, Id rather get this cleanup merged. |
I am fine with this in principle. I just want to check that it does not break the minimal config. |
@swift-ci please test stdlib with toolchain |
preset=stdlib_S_standalone_minimal_macho_x86_64,build,test |
Build failed |
macOS stdlib CI failure is unrelated to this patch:
|
@swift-ci test |
Windows CI failure is unrelated. |
@shahmishal do you have any concerns about this? |
@swift-ci test Windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Ok. This LGTM. Lets merge this! |
We are seeing toolchain bot failing, it might be related to this PR. https://ci.swift.org/job/oss-swift-package-osx/5267/
|
@buttaface When you are ready to re-commit this change please run |
Also, fix two places where the LLVM path was wrongly employed to set up clang, and use the Swift path in
install_toolchain_path()
.This is a continuation of #32922, which enabled building all the corelibs with a prebuilt toolchain, to non-
build-script-impl
products like the package manager. I applied this small patch to completely skip building any LLVM or corelibs targets and I was able to build and test SPM from the Oct. 22 source snapshot with the official prebuilt snapshot toolchain for Ubuntu:Then I ran this build-script invocation:
This makes it very easy to build and test several Swift repos with a prebuilt Swift toolchain, rather than having to spend hours building the compiler for any given snapshot.