-
Notifications
You must be signed in to change notification settings - Fork 10.5k
When building standalone stdlib, use Clang resource dir from the toolchain, not the system default #33675
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
When building standalone stdlib, use Clang resource dir from the toolchain, not the system default #33675
Conversation
@swift-ci test stdlib with toolchain |
Build failed |
@swift-ci please test |
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.
This seems wrong, this is under the use the host compiler path, and the resource dir cannot be mixed and matched as the headers may not be parseable.
The alternative is to change build-script-impl to explicitly set CMAKE_C_COMPILER to clang from |
…NATIVE_CLANG_TOOLS_PATH
e9501b2
to
edd3f38
Compare
@swift-ci please test |
Build failed |
Build failed |
@swift-ci test stdlib with toolchain |
1 similar comment
@swift-ci test stdlib with toolchain |
Build failed |
@swift-ci please test Linux platform |
@kubamracek, this is wrong and will need to be reverted. The reason the standalone stdlib preset uses the host clang is because the @gottesmm, you first added this flag in #25108 last year, perhaps you can chime in on whether it's really necessary and how best to fix the issue he was having. |
Can you describe what actual problem are you seeing that's caused by this change? It's been merged in for 2 months, so I'm not sure reverting is a good option. But it depends on what kind of regression are you seeing. I guess the important point is "What exactly is native-clang-tools-path supposed to mean?" I would argue that it's technically supposed to mean something like "When set, use this path for clang/clang++ for all C/C++ compilations, avoid using any other compilers". Given that, this PR is actually fixing an important bug, which has nothing to do with the other flags or with the preset. Let's also get @compnerd's take on this. |
It has not caused a problem for me yet, but it's the wrong way to fix your problem.
Well, that's not what it does even now, let me explain as I have been looking into this lately. The build-script requires a On top of this, you've now added a third
It matters because the reason given above is to fix that preset, which explicitly has a flag set to only use the If you change the reason for this pull to other products, I noted above that several were already using |
This is to resolve this failure: https://ci.swift.org/job/swift-PR-stdlib-with-toolchain-osx/6/consoleFull