From ff312017799d42d2ce361ff0fca0fecb294bdf4c Mon Sep 17 00:00:00 2001 From: Arshia Ghafoori Date: Tue, 6 Aug 2024 19:02:01 +0400 Subject: [PATCH] Update config template w.r.t change in rust 1.80 --- src/toolchain.rs | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/toolchain.rs b/src/toolchain.rs index 1bba9bb..b8857e2 100644 --- a/src/toolchain.rs +++ b/src/toolchain.rs @@ -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. @@ -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) }