Skip to content

Commit

Permalink
Link with runtime library
Browse files Browse the repository at this point in the history
Link with libclang_rt.builtins-x86_64.a as temporary fix.
Should not be needed.
  • Loading branch information
tenko committed Mar 17, 2024
1 parent da15d16 commit 98ec358
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/codegen/llvm/LLVMCodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ void LLVMCodeGen::configure() {
if (jit_->getTargetTriple().isOSWindows()) {
sys::DynamicLibrary::LoadLibraryPermanently("%SystemRoot%\\System32\\ucrtbase.dll");
}
if (jit_->getTargetTriple().isOSCygMing()) {
auto &dylib = exitOnErr_(jit_->createJITDylib("name"));
exitOnErr_(jit_->linkStaticLibraryInto(dylib, "C:\\msys64\\clang64\\lib\\clang\\17\\lib\\windows\\libclang_rt.builtins-x86_64.a"));
jit_->getMainJITDylib().addToLinkOrder(dylib);
}
// Load libraries
for (const auto& name : config_.getLibraries()) {
logger_.debug("Searching for library: '" + name + "'.");
Expand Down

0 comments on commit 98ec358

Please sign in to comment.