Skip to content

Commit

Permalink
Fix bad commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Arshia001 committed Aug 6, 2024
1 parent ff31201 commit 374a7c5
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions src/toolchain.rs
Original file line number Diff line number Diff line change
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 374a7c5

Please sign in to comment.