···1-diff --git i/src/cpp/core/libclang/LibClang.cpp w/src/cpp/core/libclang/LibClang.cpp
2-index ec12a3a1ff..8c81b633ae 100644
3---- i/src/cpp/core/libclang/LibClang.cpp
4-+++ w/src/cpp/core/libclang/LibClang.cpp
5-@@ -54,7 +54,7 @@ std::vector<std::string> defaultCompileArgs(LibraryVersion version)
67 // we need to add in the associated libclang headers as
8 // they are not discovered / used by default during compilation
9-- FilePath llvmPath = s_libraryPath.parent().parent();
10+ FilePath llvmPath("@libclang@");
11 boost::format fmt("%1%/lib/clang/%2%/include");
12- fmt % llvmPath.absolutePath() % version.asString();
13 std::string includePath = fmt.str();
14-@@ -77,10 +77,7 @@ std::vector<std::string> systemClangVersions()
15- #elif defined(__unix__)
16- // default set of versions
17- clangVersions = {
00000000000000018- "/usr/lib/libclang.so",
19- "/usr/lib/llvm/libclang.so",
20- "/usr/lib64/libclang.so",
21- "/usr/lib64/llvm/libclang.so",
22-+ "@libclang.so@"
23- };
24-25- // iterate through the set of available 'llvm' directories
000000000000000000000
···1+diff --git a/src/cpp/core/libclang/LibClang.cpp b/src/cpp/core/libclang/LibClang.cpp
2+index 1186f3a..58e8cc7 100644
3+--- a/src/cpp/core/libclang/LibClang.cpp
4++++ b/src/cpp/core/libclang/LibClang.cpp
5+@@ -58,7 +58,7 @@ std::vector<std::string> defaultCompileArgs(LibraryVersion version)
67 // we need to add in the associated libclang headers as
8 // they are not discovered / used by default during compilation
9+- FilePath llvmPath = s_libraryPath.getParent().getParent();
10+ FilePath llvmPath("@libclang@");
11 boost::format fmt("%1%/lib/clang/%2%/include");
12+ fmt % llvmPath.getAbsolutePath() % version.asString();
13 std::string includePath = fmt.str();
14+@@ -70,46 +70,7 @@ std::vector<std::string> defaultCompileArgs(LibraryVersion version)
15+16+ std::vector<std::string> systemClangVersions()
17+ {
18+- std::vector<std::string> clangVersions;
19+-
20+-#if defined(__APPLE__)
21+- // NOTE: the version of libclang.dylib bundled with Xcode
22+- // doesn't seem to work well when loaded as a library
23+- // (there seems to be extra orchestration required to get
24+- // include paths set up; easier to just depend on command
25+- // line tools since we request their installation in other
26+- // contexts as well)
27+- clangVersions = {
28+- "/Library/Developer/CommandLineTools/usr/lib/libclang.dylib"
29+- };
30+-#elif defined(__unix__)
31+- // default set of versions
32+- clangVersions = {
33- "/usr/lib/libclang.so",
34- "/usr/lib/llvm/libclang.so",
35- "/usr/lib64/libclang.so",
36- "/usr/lib64/llvm/libclang.so",
37+- };
38+-
39+- // iterate through the set of available 'llvm' directories
40+- for (const char* prefix : {"/usr/lib", "/usr/lib64"})
41+- {
42+- FilePath prefixPath(prefix);
43+- if (!prefixPath.exists())
44+- continue;
45+-
46+- std::vector<FilePath> directories;
47+- Error error = prefixPath.getChildren(directories);
48+- if (error)
49+- LOG_ERROR(error);
50+-
51+- // generate a path for each 'llvm' directory
52+- for (const FilePath& path : directories)
53+- if (path.getFilename().find("llvm") == 0)
54+- clangVersions.push_back(path.completePath("lib/libclang.so.1").getAbsolutePath());
55+- }
56+-#endif
57+-
58++ std::vector<std::string> clangVersions = { "@libclang.so@" };
59+ return clangVersions;
60+ }
61+