Skip to content

Commit 4bcaa4f

Browse files
Correctly handle cargo_target_dir
1 parent 4256928 commit 4bcaa4f

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_codegen_gcc/build_system/src

1 file changed

+2
-4
lines changed

compiler/rustc_codegen_gcc/build_system/src/config.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,7 @@ impl ConfigInfo {
446446
));
447447
let ld_library_path = format!(
448448
"{target}:{sysroot}:{gcc_path}",
449-
// FIXME: It's possible to pick another out directory. Would be nice to have a command
450-
// line option to change it.
451-
target = current_dir.join("target/out").display(),
449+
target = self.cargo_target_dir,
452450
sysroot = sysroot.display(),
453451
gcc_path = self.gcc_path,
454452
);
@@ -473,7 +471,7 @@ impl ConfigInfo {
473471
self.rustc_command.extend_from_slice(&rustflags);
474472
self.rustc_command.extend_from_slice(&[
475473
"-L".to_string(),
476-
"crate=target/out".to_string(),
474+
format!("crate={}", self.cargo_target_dir),
477475
"--out-dir".to_string(),
478476
self.cargo_target_dir.clone(),
479477
]);

0 commit comments

Comments
 (0)