Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1648,12 +1648,18 @@ impl Step for Assemble {
};

if let Some(enzyme_install) = enzyme_install {
let src_lib = enzyme_install.join("build/Enzyme/libEnzyme-17.so");
let lib_ext = match env::consts::OS {
"macos" => "dylib",
"windows" => "dll",
_ => "so",
};

let src_lib = enzyme_install.join("build/Enzyme/libEnzyme-17").with_extension(lib_ext);

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("libEnzyme-17.so");
let target_dst_lib = target_libdir.join("libEnzyme-17.so");
let dst_lib = libdir.join("libEnzyme-17").with_extension(lib_ext);
let target_dst_lib = target_libdir.join("libEnzyme-17").with_extension(lib_ext);
builder.copy(&src_lib, &dst_lib);
builder.copy(&src_lib, &target_dst_lib);
}
Expand All @@ -1665,9 +1671,10 @@ impl Step for Assemble {
// when not performing a full bootstrap).
builder.ensure(Rustc::new(build_compiler, target_compiler.host));

// FIXME: For now patch over problems noted in #90244 by early returning here, even though
// we've not properly assembled the target sysroot. A full fix is pending further investigation,
// for now full bootstrap usage is rare enough that this is OK.
// FIXME: For now patch over problems noted in #90244 by early returning
// here, even though we've not properly assembled the target sysroot. A
// full fix is pending further investigation, for now full bootstrap
// usage is rare enough that this is OK.
if target_compiler.stage >= 3 && !builder.config.full_bootstrap {
return target_compiler;
}
Expand All @@ -1686,9 +1693,8 @@ impl Step for Assemble {

let lld_install = if builder.config.lld_enabled {
Some(builder.ensure(llvm::Lld { target: target_compiler.host }))
} else {
None
};
}
else {None};

let stage = target_compiler.stage;
let host = target_compiler.host;
Expand Down
Loading