[llvm-jitlink] Don't hardcode LLVM version number into the runtime path.

This should unbreak builders that were failing due to different patch numbers.
This commit is contained in:
Lang Hames 2021-07-27 13:03:19 +10:00
parent ae70b211eb
commit 25986a21ef
1 changed files with 5 additions and 1 deletions

View File

@ -1191,7 +1191,11 @@ static Error sanitizeArguments(const Triple &TT, const char *ArgV0) {
if (DefaultOrcRuntimePath.endswith("bin"))
sys::path::remove_filename(DefaultOrcRuntimePath); // remove 'bin'
sys::path::append(DefaultOrcRuntimePath,
"lib/clang/13.0.0/lib/darwin/libclang_rt.orc_osx.a");
("lib/clang/" + Twine(LLVM_VERSION_MAJOR) + "." +
Twine(LLVM_VERSION_MINOR) + "." +
Twine(LLVM_VERSION_PATCH) +
"/lib/darwin/libclang_rt.orc_osx.a")
.str());
OrcRuntimePath = DefaultOrcRuntimePath.str().str();
}
}