-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Toolchain] Lookup clang in the toolchain #2159
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
Conversation
@swift-ci smoke test |
Sources/Build/BuildPlan.swift
Outdated
if Process.env.keys.contains("SWIFTPM_ENABLE_CLANG_INDEX_STORE") { | ||
args += buildParameters.indexStoreArguments | ||
} else if buildParameters.triple.isDarwin(), (try? buildParameters.toolchain._isClangCompilerVendorApple()) == true { | ||
if !Process.env.keys.contains("SWIFTPM_DISABLE_CLANG_INDEX_STORE") { |
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.
FYI @akyrtzi @benlangmuir
We install clang in the package build, but not in other CI jobs like regular PR tests AFAIK. CC @hyp |
That's fine, you can still provide a custom clang using CC |
We would need to update all those package builds to do that before we can land this though |
Oh, I see what you mean. I guess we can look for clang on the host as well. |
@swift-ci smoke test |
@swift-ci smoke test linux |
Now that we have clang shipping in the Swift toolchains, we can just locate it in the bin dir. <rdar://problem/51077480> https://bugs.swift.org/browse/SR-10633
@swift-ci smoke test |
@weissi Do you need this in 5.1? |
That would be extremely helpful because more often than not, folks are compiling with the wrong clang (the one from the system as it’s in |
@aciidb0mb3r will this make it into 5.1? |
@aciidb0mb3r ignore my question, I just checked and it's already on |
Now that we have clang shipping in the Swift toolchains, we can just
locate it in the bin dir. This also removes the hack we did for enabling
index store only on Darwin. There is a new env variable
SWIFTPM_DISABLE_CLANG_INDEX_STORE if someone wants to explictly disable
the index store.
rdar://problem/51077480
https://bugs.swift.org/browse/SR-10633