Skip to content

Commit 8fd6beb

Browse files
committed
wip
1 parent ebbe811 commit 8fd6beb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,14 @@ pub(crate) unsafe fn llvm_optimize(
774774
};
775775

776776
if cgcx.target_is_like_gpu && config.offload.contains(&config::Offload::Enable) {
777+
if cgcx.save_temps {
778+
// TODO.
779+
}
780+
//let out_dir = &cgcx.output_filenames;
781+
dbg!(&cgcx.output_filenames.out());
782+
let host_obj_c = &cgcx.output_filenames.with_extension("host.out");
783+
let out_obj_c = &cgcx.output_filenames.with_extension("host.o");
784+
// &out_dir = "/p/lustre1/drehwald1/prog/offload/r/target/amdgcn-amd-amdhsa/release/deps/libr.rs"
777785
let lib_bc_c = CString::new("/p/lustre1/drehwald1/prog/offload/r/lib.bc").unwrap();
778786
let host_out_c = CString::new("/p/lustre1/drehwald1/prog/offload/r/host.out").unwrap();
779787
let out_obj_c = CString::new("/p/lustre1/drehwald1/prog/offload/r/host.o").unwrap();

compiler/rustc_session/src/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,10 @@ impl OutputFilenames {
12791279
self.with_directory_and_extension(&self.out_directory, extension)
12801280
}
12811281

1282+
pub fn out(&self) -> PathBuf {
1283+
self.out_directory.clone()
1284+
}
1285+
12821286
pub fn with_directory_and_extension(&self, directory: &Path, extension: &str) -> PathBuf {
12831287
let mut path = directory.join(&self.filestem);
12841288
path.set_extension(extension);

0 commit comments

Comments
 (0)