[5.2] [tibs] Detect clang index support using -help instead of --version #106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 --versiondoes not produce anerror, but unfortunately older versions of clang accepted
-index-store-pathdue to the existince of a-ioption that has sincebeen 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.