From 512c4844d2d13000411643c33ffbb57405d62d7c Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Fri, 2 Aug 2024 19:10:33 +0200 Subject: [PATCH] fix enzyme library used for build (#150) * fix enzyme library used for build --- src/bootstrap/src/core/build_steps/compile.rs | 6 +++--- src/bootstrap/src/core/build_steps/llvm.rs | 2 +- src/bootstrap/src/core/builder.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index cdb798c47d571..ed2435d694df7 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1648,12 +1648,12 @@ impl Step for Assemble { }; if let Some(enzyme_install) = enzyme_install { - let src_lib = enzyme_install.join("build/Enzyme/LLVMEnzyme-17.so"); + let src_lib = enzyme_install.join("build/Enzyme/libEnzyme-17.so"); let libdir = builder.sysroot_libdir(build_compiler, build_compiler.host); let target_libdir = builder.sysroot_libdir(target_compiler, target_compiler.host); - let dst_lib = libdir.join("libLLVMEnzyme-17.so"); - let target_dst_lib = target_libdir.join("libLLVMEnzyme-17.so"); + let dst_lib = libdir.join("libEnzyme-17.so"); + let target_dst_lib = target_libdir.join("libEnzyme-17.so"); builder.copy(&src_lib, &dst_lib); builder.copy(&src_lib, &target_dst_lib); } diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index 57f15faca1315..9c3e40913187f 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -894,7 +894,7 @@ impl Step for Enzyme { .profile(profile) .env("LLVM_CONFIG_REAL", &llvm_config) .define("LLVM_ENABLE_ASSERTIONS", "ON") - .define("ENZYME_EXTERNAL_SHARED_LIB", "OFF") + .define("ENZYME_EXTERNAL_SHARED_LIB", "ON") .define("LLVM_DIR", &llvm_cmake_dir); cfg.build(); diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs index eb028c367d797..e7d02653baf78 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs @@ -1419,7 +1419,7 @@ impl<'a> Builder<'a> { // https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20link.20new.20library.20into.20stage1.2Frustc if self.config.llvm_enzyme { rustflags.arg("-l"); - rustflags.arg("LLVMEnzyme-17"); + rustflags.arg("Enzyme-17"); } let use_new_symbol_mangling = match self.config.rust_new_symbol_mangling {