Skip to content

Conversation

@drexin
Copy link

@drexin drexin commented Jul 8, 2020

The previous check for apple-clang, swift-clang, etc. was failing on
released toolchains, since they don't contain the repo name, and on
clones of the repo that didn't match the pattern.

Check clang -help for index store support. It would be better to check
that clang -index-store-path /dev/null --version does not produce an
error, but unfortunately older versions of clang accepted
-index-store-path due to the existince of a -i option that has since
been removed. While we could check a full compile command, I have not
found a robust command that detects index support without also doing I/O
in the index directory when it succeeds. To avoid I/O, we check -help.

The previous check for apple-clang, swift-clang, etc. was failing on
released toolchains, since they don't contain the repo name, and on
clones of the repo that didn't match the pattern.

Check clang -help for index store support. It would be better to check
that `clang -index-store-path /dev/null --version` does not produce an
error, but unfortunately older versions of clang accepted
`-index-store-path` due to the existince of a `-i` option that has since
been removed. While we could check a full compile command, I have not
found a robust command that detects index support without also doing I/O
in the index directory when it succeeds. To avoid I/O, we check -help.
@drexin drexin changed the title [tibs] Detect clang index support using -help instead of --version [5.2] [tibs] Detect clang index support using -help instead of --version Jul 8, 2020
@drexin drexin merged commit 20a17d4 into swiftlang:swift-5.2-branch Jul 8, 2020
@drexin drexin deleted the wip-backport-clang-fix branch July 8, 2020 21:47
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.

2 participants