Fixed Issue #186: Build fails on Arch Linux #340
Merged
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.
Fixed Issue #186:
CMakeLists.txt
to not elevate the includes to system includes (i.e. skipping the regex replacement from-I
to-isystem
).That resolved the issue described in issue #186 but it uncovered another issue:
This was an out of clang build run on a Manjaro system:
This is an issue similar to one experienced by building ccls on Arch. I followed the same pattern here by toggling on
CLANG_LINK_CLANG_DYLIB
andLLVM_LINK_LLVM_DYLIB
(and linking against the same libsccls
uses in those cases).Using the new flags (
DCLANG_LINK_CLANG_DYLIB=on -DLLVM_LINK_LLVM_DYLIB=on -DINSIGHTS_USE_SYSTEM_INCLUDES=off
), I'm now able to get a clean out-of-clang build ofinsights
:I also edited the
Readme
with the special instructions to build on Arch.Note: Due to how
ADDITIONAL_LIBS
is set up for an out-of-clang build, we needCLANG_LINK_CLANG_DYLIB
andLLVM_LINK_LLVM_DYLIB
to have the same value, otherwise things break, so I added an error message to make sure miss-matched values are not provided.