Skip to content

Commit

Permalink
Unset CARGO_TARGET_DIR when building wrapper package
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Nov 25, 2024
1 parent dd2c4d2 commit aa4a646
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/linking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ fn wrap(linker: &str, build_script_path: &Path) -> Result<()> {
"--config",
&format!("target.'cfg(all())'.linker = '{linker}'"),
]);
// smoelius: Unset `CARGO_TARGET_DIR` environment variable.
command.env_remove("CARGO_TARGET_DIR");
// smoelius: `cd` into `wrapper_package`'s directory to avoid any `.cargo/config.toml` that may
// be in ancestors of the current directory.
command.current_dir(&wrapper_package);
Expand Down

0 comments on commit aa4a646

Please sign in to comment.