Skip to content

Commit

Permalink
Update config template w.r.t change in rust 1.80
Browse files Browse the repository at this point in the history
  • Loading branch information
Arshia001 committed Aug 6, 2024
1 parent 07d5637 commit ff31201
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/toolchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ fn build_rust(
}

let config_tpl = r#"
changelog-seen = 2
change-id = 125535
# NOTE: can't enable because using the cached llvm prevents building rust-lld,
# which is required for the toolchain to work.
Expand Down Expand Up @@ -820,29 +820,29 @@ WARNING: building takes a long time!"#
#[cfg(target_os = "windows")]
let rust_cmd = "rustc.exe";

let rust_sysroot = Command::new(rust_cmd)
.arg(format!("+{}", toolchain.name))
.arg("--print")
.arg("sysroot")
.capture_stdout()
.map(|out| PathBuf::from(out.trim()))
.context("Could not execute rustc")?;
assert_eq!(toolchain.path, rust_sysroot);

let lib_name = if is64bit {
"lib/rustlib/wasm64-wasmer-wasi"
} else {
"lib/rustlib/wasm32-wasmer-wasi"
};
let lib_dir = rust_sysroot.join(lib_name);
if !lib_dir.exists() {
bail!(
"Invalid wasix rustup toolchain {} at {}: {} does not exist",
toolchain.name,
toolchain.path.display(),
lib_dir.display()
);
}
// let rust_sysroot = Command::new(rust_cmd)
// .arg(format!("+{}", toolchain.name))
// .arg("--print")
// .arg("sysroot")
// .capture_stdout()
// .map(|out| PathBuf::from(out.trim()))
// .context("Could not execute rustc")?;
// assert_eq!(toolchain.path, rust_sysroot);

// let lib_name = if is64bit {
// "lib/rustlib/wasm64-wasmer-wasi"
// } else {
// "lib/rustlib/wasm32-wasmer-wasi"
// };
// let lib_dir = rust_sysroot.join(lib_name);
// if !lib_dir.exists() {
// bail!(
// "Invalid wasix rustup toolchain {} at {}: {} does not exist",
// toolchain.name,
// toolchain.path.display(),
// lib_dir.display()
// );
// }
Ok(toolchain)
}

Expand Down

0 comments on commit ff31201

Please sign in to comment.