Skip to content

Commit

Permalink
feat: add rt lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronostasys committed Apr 30, 2024
1 parent 38290c1 commit 1a998b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use vergen::EmitBuilder;

pub fn main() {
// on windows, link clang_rt.builtins-x86_64.lib
println!("cargo:rustc-link-lib=clang_rt.builtins-x86_64");

// NOTE: This will output everything, and requires all features enabled.
// NOTE: See the EmitBuilder documentation for configuration options.
EmitBuilder::builder()
Expand Down
2 changes: 2 additions & 0 deletions immix/llvm/memory_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ extern "C"
InitializeNativeTarget();
InitializeNativeTargetAsmPrinter();
InitializeNativeTargetAsmParser();
llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
std::string lib_full_path = getLibvmPath();
std::string errMsgString;
llvm::sys::DynamicLibrary::LoadLibraryPermanently(lib_full_path.c_str(), &errMsgString);
Expand Down Expand Up @@ -434,6 +435,7 @@ extern "C"
InitializeNativeTarget();
InitializeNativeTargetAsmPrinter();
InitializeNativeTargetAsmParser();
llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
std::string lib_full_path = getLibvmPath();
// llvm::sys::DynamicLibrary::LoadLibraryPermanently(lib_full_path.c_str());
auto jit = ExitOnErr(PivotJIT::Create());
Expand Down

0 comments on commit 1a998b6

Please sign in to comment.