Skip to content

[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

Merged
merged 1 commit into from
Jun 13, 2019

Conversation

aciidgh
Copy link
Contributor

@aciidgh aciidgh commented Jun 12, 2019

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

@aciidgh
Copy link
Contributor Author

aciidgh commented Jun 12, 2019

@swift-ci smoke test

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") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benlangmuir
Copy link
Contributor

We install clang in the package build, but not in other CI jobs like regular PR tests AFAIK. CC @hyp

@aciidgh
Copy link
Contributor Author

aciidgh commented Jun 12, 2019

That's fine, you can still provide a custom clang using CC

@benlangmuir
Copy link
Contributor

We would need to update all those package builds to do that before we can land this though

@aciidgh
Copy link
Contributor Author

aciidgh commented Jun 12, 2019

Oh, I see what you mean. I guess we can look for clang on the host as well.

@aciidgh
Copy link
Contributor Author

aciidgh commented Jun 12, 2019

@swift-ci smoke test

@aciidgh
Copy link
Contributor Author

aciidgh commented Jun 12, 2019

@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
@aciidgh
Copy link
Contributor Author

aciidgh commented Jun 12, 2019

@swift-ci smoke test

@aciidgh aciidgh merged commit 71abb4c into swiftlang:master Jun 13, 2019
@aciidgh aciidgh deleted the clang-toolchain branch June 13, 2019 00:07
@aciidgh
Copy link
Contributor Author

aciidgh commented Jun 13, 2019

@weissi Do you need this in 5.1?

@weissi
Copy link
Contributor

weissi commented Jun 13, 2019

@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 $PATH) on Linux

@weissi
Copy link
Contributor

weissi commented Jun 28, 2019

@aciidb0mb3r will this make it into 5.1?

@weissi
Copy link
Contributor

weissi commented Jun 28, 2019

@aciidb0mb3r ignore my question, I just checked and it's already on swift-5.1-branch. Thanks so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants