Skip to content

Sync cg clif 2024 12 06 #133956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
df983ce
Merge commit '1fa693ca4462fc1f790693464cf765ad693616af' into sync_cg_…
bjorn3 Nov 9, 2024
ee20de5
Merge branch 'sync_from_rust'
bjorn3 Nov 9, 2024
995ccb6
Add a default implementation for CodegenBackend::link
bjorn3 Nov 9, 2024
35e138e
Rustup to rustc 1.84.0-nightly (81eef2d36 2024-11-11)
bjorn3 Nov 12, 2024
89c5aa9
Fix rustc test suite
bjorn3 Nov 12, 2024
b98b620
Disable clif ir verifier by default
bjorn3 Nov 11, 2024
0b8e94e
Merge pull request #1542 from rust-lang/disable_verifier
bjorn3 Nov 12, 2024
1a27566
Likely unlikely fix
x17jiri Jul 26, 2024
22b0e3c
remove pointless cold_path impl in interpreter
RalfJung Nov 18, 2024
19a8eb2
use `TypingEnv` when no `infcx` is available
lcnr Nov 15, 2024
43181b4
Auto merge of #132460 - lcnr:questionable-uwu, r=compiler-errors
bors Nov 18, 2024
c5c3709
Explicitly disable llvm tools for cranelift
jieyouxu Nov 19, 2024
a4acd22
move `fn is_item_raw` to `TypingEnv`
lcnr Nov 19, 2024
bf45e9f
`InterpCx` store `TypingEnv` instead of a `ParamEnv`
lcnr Nov 19, 2024
67c8877
Auto merge of #133212 - lcnr:questionable-uwu, r=compiler-errors
bors Nov 20, 2024
329cd79
reduce false positives of tail-expr-drop-order from consumed values
dingxiangfei2009 Sep 1, 2024
d09f798
Sync from rust 3fee0f12e4f595948f8f54f57c8b7a7a58127124
bjorn3 Nov 21, 2024
a960aac
Rustup to rustc 1.84.0-nightly (3fee0f12e 2024-11-20)
bjorn3 Nov 21, 2024
9d1de63
Fix rustc test suite
bjorn3 Nov 21, 2024
ebacaee
Update to Cranelift 0.114
bjorn3 Nov 7, 2024
1cc1079
Remove enable_verifier from BackendConfig
bjorn3 Nov 21, 2024
bd209ed
Remove disable_incr_cache from BackendConfig
bjorn3 Nov 21, 2024
5d5cd2a
Avoid RefCell in CodegenBackend
bjorn3 Nov 21, 2024
56a64ba
Avoid Cell in CodegenCx
bjorn3 Nov 21, 2024
5644a08
Stop passing BackendConfig to run_jit
bjorn3 Nov 21, 2024
cb51cfe
Simplify config.rs
bjorn3 Nov 21, 2024
1c372ca
Make the cold_path intrinsic mark the current block as cold
bjorn3 Nov 21, 2024
4f213ad
Inline all RelPath::ensure_fresh
bjorn3 Sep 12, 2024
5763c09
Remove RelPath::DOWNLOAD
bjorn3 Sep 12, 2024
fdca75c
Refactor and reduce usage of RelPath
bjorn3 Sep 12, 2024
510943a
remove remaining references to `Reveal`
lcnr Nov 20, 2024
8f9d765
Add simd_relaxed_fma intrinsic
calebzulawski Nov 23, 2024
1876e52
Make s390x non-clobber-only vector register support unstable
taiki-e Nov 24, 2024
b9e2bdd
Fix clobber_abi in RV32E and RV64E inline assembly
taiki-e Nov 24, 2024
e73d321
Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=Amanieu
matthiaskrgr Nov 25, 2024
e5bc7e3
Fix handling of x18 in AArch64 inline assembly on ohos/trusty or with…
taiki-e Nov 25, 2024
4161cef
Rollup merge of #133422 - taiki-e:riscv-e-clobber-abi, r=Amanieu
GuillaumeGomez Nov 28, 2024
1aded60
Rollup merge of #133463 - taiki-e:aarch64-asm-x18, r=Amanieu
GuillaumeGomez Nov 28, 2024
a2e9aac
Replace `Symbol::intern` calls with preinterned symbols
clubby789 Nov 27, 2024
632ccac
Sync from rust 6b6a867ae9eac4e78d041ac4ee84be1072a48cf7
bjorn3 Nov 28, 2024
e595d03
Rustup to rustc 1.85.0-nightly (6b6a867ae 2024-11-27)
bjorn3 Nov 28, 2024
e82b533
Fix rustc test suite
bjorn3 Nov 28, 2024
95bb635
Fix std_example on s390x
bjorn3 Nov 28, 2024
c5acac9
Rollup merge of #133395 - calebzulawski:simd_relaxed_fma, r=workingju…
matthiaskrgr Dec 3, 2024
7174bcc
Rollup merge of #133545 - clubby789:symbol-intern-lit, r=jieyouxu
matthiaskrgr Dec 3, 2024
812edd2
Sync from rust c44b3d50fea96a3e0417e8264c16ea21a0a3fca2
bjorn3 Dec 4, 2024
eff1c5d
Rustup to rustc 1.85.0-nightly (c44b3d50f 2024-12-03)
bjorn3 Dec 4, 2024
2853388
Fix rustc test suite
bjorn3 Dec 4, 2024
357deaa
Move disabling of f16 and f128 in compiler-builtins to liballoc
bjorn3 Dec 4, 2024
623a6da
Move SelfProfilerRef out of CodegenCx
bjorn3 Dec 5, 2024
1d940ad
Extract emit_metadata_module
bjorn3 Jun 27, 2024
53e1043
Extract emit_allocator_module
bjorn3 Jun 27, 2024
a767a10
Extract codegen_cgu_content
bjorn3 Jun 28, 2024
65c5c7f
Switch to -ffunction-sections by default
bjorn3 Dec 5, 2024
92b5873
Make artifact_size usage closer to what cg_llvm does
bjorn3 Dec 5, 2024
0974099
Revert "Switch to -ffunction-sections by default"
bjorn3 Dec 5, 2024
9fd3b18
Avoid depending on the unadjusted abi
bjorn3 Dec 5, 2024
d8edcd5
Handle abi adjusting in lib_call correctly for s390x
bjorn3 Dec 5, 2024
7e0d1b6
Merge pull request #1546 from rust-lang/libcall_abi_fixes
bjorn3 Dec 5, 2024
57845a3
Rustup to rustc 1.85.0-nightly (c94848c04 2024-12-05)
bjorn3 Dec 6, 2024
b3d837a
Merge commit '57845a397ec15e4e6a561ed2c4bfa3dcf49144fb' into sync_cg_…
bjorn3 Dec 6, 2024
063e21b
Cargo decided to add serde to cg_clif's lockfile despite serde suppor…
bjorn3 Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 49 additions & 28 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5e7afe85cadb55c4c1176268a2ac046fdff8dfaeca39e18581b9dc319ca9e"
checksum = "2ba4f80548f22dc9c43911907b5e322c5555544ee85f785115701e6a28c9abe1"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-bitset"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ab25ef3be935a80680e393183e1f94ef507e93a24a8369494d2c6818aedb3e3"
checksum = "005884e3649c3e5ff2dc79e8a94b138f11569cc08a91244a292714d2a86e9156"

[[package]]
name = "cranelift-codegen"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "900a19b84545924f1851cbfe386962edfc4ecbc3366a254825cf1ecbcda8ba08"
checksum = "fe4036255ec33ce9a37495dfbcfc4e1118fd34e693eff9a1e106336b7cd16a9b"
dependencies = [
"bumpalo",
"cranelift-bforest",
Expand All @@ -78,48 +78,49 @@ dependencies = [
"log",
"regalloc2",
"rustc-hash",
"serde",
"smallvec",
"target-lexicon",
]

[[package]]
name = "cranelift-codegen-meta"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c73b2395ffe9e7b4fdf7e2ebc052e7e27af13f68a964985346be4da477a5fc"
checksum = "f7ca74f4b68319da11d39e894437cb6e20ec7c2e11fbbda823c3bf207beedff7"
dependencies = [
"cranelift-codegen-shared",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d9ed0854e96a4ff0879bff39d078de8dea7f002721c9494c1fdb4e1baa86ccc"
checksum = "897e54f433a0269c4187871aa06d452214d5515d228d5bdc22219585e9eef895"

[[package]]
name = "cranelift-control"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4aca921dd422e781409de0129c255768fec5dec1dae83239b497fb9138abb89"
checksum = "29cb4018f5bf59fb53f515fa9d80e6f8c5ce19f198dc538984ebd23ecf8965ec"
dependencies = [
"arbitrary",
]

[[package]]
name = "cranelift-entity"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d770e6605eccee15b49decdd82cd26f2b6404767802471459ea49c57379a98"
checksum = "305399fd781a2953ac78c1396f02ff53144f39c33eb7fc7789cf4e8936d13a96"
dependencies = [
"cranelift-bitset",
]

[[package]]
name = "cranelift-frontend"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29268711cb889cb39215b10faf88b9087d4c9e1d2633581e4f722a2bf4bb4ef9"
checksum = "9230b460a128d53653456137751d27baf567947a3ab8c0c4d6e31fd08036d81e"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -129,15 +130,15 @@ dependencies = [

[[package]]
name = "cranelift-isle"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc65156f010aed1985767ad1bff0eb8d186743b7b03e23d0c17604a253e3f356"
checksum = "b961e24ae3ec9813a24a15ae64bbd2a42e4de4d79a7f3225a412e3b94e78d1c8"

[[package]]
name = "cranelift-jit"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ba6b46367a4f466cfb1abe32793fa1a0f96d862251491b01a44726b8ed9445"
checksum = "62699329d4ced20fe281fbaef45e11b473b7ab310491b4bdebcd8b818a8ef7fe"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -155,9 +156,9 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "007607022a4883ebdffc46c0925e2e10babf2a565ae78518034ade722aa825d2"
checksum = "2f20b0b51ba962dac30fc7e812b86e4390d908acd4f59bcc8ac7610a8f3e0977"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -166,9 +167,9 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8bf9b361eaf5a7627647270fabf1dc910d993edbeaf272a652c107861ebe9c2"
checksum = "4d5bd76df6c9151188dfa428c863b33da5b34561b67f43c0cf3f24a794f9fa1f"
dependencies = [
"cranelift-codegen",
"libc",
Expand All @@ -177,9 +178,9 @@ dependencies = [

[[package]]
name = "cranelift-object"
version = "0.113.0"
version = "0.114.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30ca5c38fa00c0cd943035391bdcc84ed00748f17c66c682e410f5a62f234d44"
checksum = "ee231640a7ecceedd0f1f2782d9288db6a6908cc70675ed9427e3bf0ea6daacd"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand Down Expand Up @@ -363,6 +364,26 @@ dependencies = [
"target-lexicon",
]

[[package]]
name = "serde"
version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
dependencies = [
"serde_derive",
]

[[package]]
name = "serde_derive"
version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
dependencies = [
"proc-macro2",
"quote",
"syn",
]

[[package]]
name = "slice-group-by"
version = "0.3.1"
Expand Down Expand Up @@ -412,9 +433,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"

[[package]]
name = "wasmtime-jit-icache-coherence"
version = "26.0.0"
version = "27.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e458e6a1a010a53f86ac8d75837c0c6b2ce3e54b7503b2f1dc5629a4a541f5a"
checksum = "91b218a92866f74f35162f5d03a4e0f62cd0e1cc624285b1014275e5d4575fad"
dependencies = [
"anyhow",
"cfg-if",
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_codegen_cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.113.0", default-features = false, features = ["std", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.113.0" }
cranelift-module = { version = "0.113.0" }
cranelift-native = { version = "0.113.0" }
cranelift-jit = { version = "0.113.0", optional = true }
cranelift-object = { version = "0.113.0" }
cranelift-codegen = { version = "0.114.0", default-features = false, features = ["std", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.114.0" }
cranelift-module = { version = "0.114.0" }
cranelift-native = { version = "0.114.0" }
cranelift-jit = { version = "0.114.0", optional = true }
cranelift-object = { version = "0.114.0" }
target-lexicon = "0.12.0"
gimli = { version = "0.31", default-features = false, features = ["write"] }
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/build_system/abi_cafe.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::path::{Dirs, RelPath};
use crate::path::Dirs;
use crate::prepare::GitRepo;
use crate::utils::{CargoProject, Compiler, spawn_and_wait};
use crate::{CodegenBackend, SysrootKind, build_sysroot};
Expand All @@ -20,7 +20,7 @@ pub(crate) fn run(
rustup_toolchain_name: Option<&str>,
bootstrap_host_compiler: &Compiler,
) {
RelPath::DOWNLOAD.ensure_exists(dirs);
std::fs::create_dir_all(&dirs.download_dir).unwrap();
ABI_CAFE_REPO.fetch(dirs);
ABI_CAFE_REPO.patch(dirs);

Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_codegen_cranelift/build_system/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::io::Write;
use std::path::Path;
use std::process::Command;

use crate::path::{Dirs, RelPath};
use crate::path::Dirs;
use crate::prepare::GitRepo;
use crate::rustc_info::get_file_name;
use crate::utils::{Compiler, spawn_and_wait};
Expand Down Expand Up @@ -39,11 +39,11 @@ fn benchmark_simple_raytracer(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
};

eprintln!("[BENCH COMPILE] ebobby/simple-raytracer");
let cargo_clif = RelPath::DIST
.to_path(dirs)
let cargo_clif = dirs
.dist_dir
.join(get_file_name(&bootstrap_host_compiler.rustc, "cargo_clif", "bin").replace('_', "-"));
let manifest_path = SIMPLE_RAYTRACER_REPO.source_dir().to_path(dirs).join("Cargo.toml");
let target_dir = RelPath::BUILD.join("simple_raytracer").to_path(dirs);
let target_dir = dirs.build_dir.join("simple_raytracer");

let clean_cmd = format!(
"RUSTC=rustc cargo clean --manifest-path {manifest_path} --target-dir {target_dir}",
Expand All @@ -68,7 +68,7 @@ fn benchmark_simple_raytracer(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
target_dir = target_dir.display(),
);

let bench_compile_markdown = RelPath::DIST.to_path(dirs).join("bench_compile.md");
let bench_compile_markdown = dirs.dist_dir.join("bench_compile.md");

let bench_compile = hyperfine_command(
1,
Expand All @@ -92,7 +92,7 @@ fn benchmark_simple_raytracer(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {

eprintln!("[BENCH RUN] ebobby/simple-raytracer");

let bench_run_markdown = RelPath::DIST.to_path(dirs).join("bench_run.md");
let bench_run_markdown = dirs.dist_dir.join("bench_run.md");

let raytracer_cg_llvm = Path::new(".").join(get_file_name(
&bootstrap_host_compiler.rustc,
Expand Down Expand Up @@ -120,7 +120,7 @@ fn benchmark_simple_raytracer(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
],
&bench_run_markdown,
);
bench_run.current_dir(RelPath::BUILD.to_path(dirs));
bench_run.current_dir(&dirs.build_dir);
spawn_and_wait(bench_run);

if let Some(gha_step_summary) = gha_step_summary.as_mut() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::rustc_info::get_file_name;
use crate::shared_utils::{rustflags_from_env, rustflags_to_cmd_env};
use crate::utils::{CargoProject, Compiler, LogGroup};

static CG_CLIF: CargoProject = CargoProject::new(&RelPath::SOURCE, "cg_clif");
static CG_CLIF: CargoProject = CargoProject::new(&RelPath::source("."), "cg_clif");

pub(crate) fn build_backend(
dirs: &Dirs,
Expand Down
22 changes: 12 additions & 10 deletions compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub(crate) fn build_sysroot(

eprintln!("[BUILD] sysroot {:?}", sysroot_kind);

let dist_dir = RelPath::DIST.to_path(dirs);
let dist_dir = &dirs.dist_dir;

ensure_empty_dir(&dist_dir);
ensure_empty_dir(dist_dir);
fs::create_dir_all(dist_dir.join("bin")).unwrap();
fs::create_dir_all(dist_dir.join("lib")).unwrap();

Expand Down Expand Up @@ -55,7 +55,7 @@ pub(crate) fn build_sysroot(
let mut build_cargo_wrapper_cmd = Command::new(&bootstrap_host_compiler.rustc);
let wrapper_path = dist_dir.join(&wrapper_name);
build_cargo_wrapper_cmd
.arg(RelPath::SCRIPTS.to_path(dirs).join(&format!("{wrapper}.rs")))
.arg(dirs.source_dir.join("scripts").join(&format!("{wrapper}.rs")))
.arg("-o")
.arg(&wrapper_path)
.arg("-Cstrip=debuginfo");
Expand Down Expand Up @@ -85,7 +85,7 @@ pub(crate) fn build_sysroot(
&cg_clif_dylib_path,
sysroot_kind,
);
host.install_into_sysroot(&dist_dir);
host.install_into_sysroot(dist_dir);

if !is_native {
build_sysroot_for_triple(
Expand All @@ -99,7 +99,7 @@ pub(crate) fn build_sysroot(
&cg_clif_dylib_path,
sysroot_kind,
)
.install_into_sysroot(&dist_dir);
.install_into_sysroot(dist_dir);
}

let mut target_compiler = {
Expand Down Expand Up @@ -143,10 +143,10 @@ impl SysrootTarget {
}
}

static STDLIB_SRC: RelPath = RelPath::BUILD.join("stdlib");
static STDLIB_SRC: RelPath = RelPath::build("stdlib");
static STANDARD_LIBRARY: CargoProject =
CargoProject::new(&STDLIB_SRC.join("library/sysroot"), "stdlib_target");
static RTSTARTUP_SYSROOT: RelPath = RelPath::BUILD.join("rtstartup");
CargoProject::new(&RelPath::build("stdlib/library/sysroot"), "stdlib_target");
static RTSTARTUP_SYSROOT: RelPath = RelPath::build("rtstartup");

fn build_sysroot_for_triple(
dirs: &Dirs,
Expand Down Expand Up @@ -247,6 +247,7 @@ fn build_clif_sysroot_for_triple(
let mut build_cmd = STANDARD_LIBRARY.build(&compiler, dirs);
build_cmd.arg("--release");
build_cmd.arg("--features").arg("backtrace panic-unwind compiler-builtins-no-f16-f128");
build_cmd.arg(format!("-Zroot-dir={}", STDLIB_SRC.to_path(dirs).display()));
build_cmd.env("CARGO_PROFILE_RELEASE_DEBUG", "true");
build_cmd.env("__CARGO_DEFAULT_LIB_METADATA", "cg_clif");
if compiler.triple.contains("apple") {
Expand Down Expand Up @@ -281,13 +282,14 @@ fn build_rtstartup(dirs: &Dirs, compiler: &Compiler) -> Option<SysrootTarget> {
return None;
}

RTSTARTUP_SYSROOT.ensure_fresh(dirs);
let rtstartup_sysroot = RTSTARTUP_SYSROOT.to_path(dirs);
ensure_empty_dir(&rtstartup_sysroot);

let rtstartup_src = STDLIB_SRC.to_path(dirs).join("library").join("rtstartup");
let mut target_libs = SysrootTarget { triple: compiler.triple.clone(), libs: vec![] };

for file in ["rsbegin", "rsend"] {
let obj = RTSTARTUP_SYSROOT.to_path(dirs).join(format!("{file}.o"));
let obj = rtstartup_sysroot.join(format!("{file}.o"));
let mut build_rtstartup_cmd = Command::new(&compiler.rustc);
build_rtstartup_cmd
.arg("--target")
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_codegen_cranelift/build_system/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,11 @@ fn main() {
frozen,
};

path::RelPath::BUILD.ensure_exists(&dirs);
std::fs::create_dir_all(&dirs.build_dir).unwrap();

{
// Make sure we always explicitly specify the target dir
let target =
path::RelPath::BUILD.join("target_dir_should_be_set_explicitly").to_path(&dirs);
let target = dirs.build_dir.join("target_dir_should_be_set_explicitly");
env::set_var("CARGO_TARGET_DIR", &target);
let _ = std::fs::remove_file(&target);
std::fs::File::create(target).unwrap();
Expand Down
Loading
Loading