sourcegraph / lsif-cpp

Language Server Index Format (LSIF) generator for C++
https://lsif.dev/
9 stars 3 forks source link

Add ENV override to specify clang version #5

Open christinaforney opened 5 years ago

christinaforney commented 5 years ago

generate-csv should have a way to override the clang command in case a different version is required. This occurred on a system with LLVM 10 as the default, so LLVM 9 was specified by overriding the LLVM_CONFIG when building via make. When running generate-csv, the system defaulted to clang 10, causing a version conflict when loading the module.

This is likely an uncommon setup, so ok to keep this on the backlog.

chrismwendt commented 5 years ago

the system defaulted to clang 10, causing a version conflict when loading the module

Do you have the error message? Without the error message, it's difficult for me to determine whether or not your proposed solution (add ENV override) would be an appropriate solution.

Maybe the appropriate solution is to add support for LLVM 10 to lsif-cpp (with a few #if directives) instead. Example:

https://github.com/sourcegraph/lsif-cpp/blob/b4454dd6ce61ad7ee5c34725baee7d82a4904fb4/clang/dxr-index.cpp#L962-L966