mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 17:44:28 +00:00
also drop now unused host.o
This commit is contained in:
@@ -843,26 +843,7 @@ pub(crate) unsafe fn llvm_optimize(
|
||||
} else if !device_pathbuf.exists() {
|
||||
dcx.emit_err(crate::diagnostics::OffloadNonexistingPath);
|
||||
}
|
||||
let host_path = cgcx.output_filenames.path(OutputType::Object);
|
||||
let host_dir = host_path.parent().unwrap();
|
||||
let out_obj = host_dir.join("host.o");
|
||||
let device_bin_c = path_to_c_string(device_pathbuf.as_path());
|
||||
|
||||
write_output_file(
|
||||
dcx,
|
||||
module.module_llvm.tm.raw(),
|
||||
config.no_builtins,
|
||||
module.module_llvm.llmod(),
|
||||
&out_obj,
|
||||
None,
|
||||
llvm::FileType::ObjectFile,
|
||||
prof,
|
||||
true,
|
||||
);
|
||||
// We ignore cgcx.save_temps here and unconditionally always keep our `device.bin` artifact.
|
||||
// Otherwise, recompiling the host code would fail since we deleted that device artifact
|
||||
// in the previous host compilation, which would be confusing at best.
|
||||
|
||||
let ok = unsafe {
|
||||
llvm::RustOffloadWrapper::get_instance().llvm_rust_offload_wrap_images(
|
||||
module.module_llvm.llmod(),
|
||||
|
||||
@@ -35,6 +35,4 @@ fn main() {
|
||||
.arg("-Clto=fat")
|
||||
.emit("obj")
|
||||
.run();
|
||||
|
||||
assert!(cwd().join("host.o").exists());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user