We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 450257c commit 5e97a39Copy full SHA for 5e97a39
1 file changed
build_system/mod.rs
@@ -48,8 +48,15 @@ pub(crate) enum SysrootKind {
48
pub fn main() {
49
env::set_var("CG_CLIF_DISPLAY_CG_TIME", "1");
50
env::set_var("CG_CLIF_DISABLE_INCR_CACHE", "1");
51
- // The target dir is expected in the default location. Guard against the user changing it.
52
- env::set_var("CARGO_TARGET_DIR", "target");
+
+ {
53
+ // Make sure we always explicitly specify the target dir
54
+ let target = "build/target_dir_should_be_set_explicitly";
55
+ env::set_var("CARGO_TARGET_DIR", target);
56
+ std::fs::create_dir_all("build").unwrap();
57
+ let _ = std::fs::remove_file(target);
58
+ let file = std::fs::File::create(target).unwrap();
59
+ }
60
61
if is_ci() {
62
// Disabling incr comp reduces cache size and incr comp doesn't save as much on CI anyway
0 commit comments