Skip to content

Commit

Permalink
Merge pull request #453 from moonbitlang/fix_native_cl_not_found
Browse files Browse the repository at this point in the history
fix native cl not found
  • Loading branch information
Young-Flash authored Nov 7, 2024
2 parents 79e45ae + aeaea42 commit d94b8b7
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions crates/moonutil/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,25 +835,10 @@ pub fn set_native_backend_link_flags(
#[cfg(windows)]
let compiler = "cl";

if let Err(e) = which::which(compiler) {
eprintln!(
"error: '{}' not found in PATH, which is used for native backend release compilation: {}",
compiler,
e
);
std::process::exit(1);
}

// libmoonbitrun.o should be in the same directory as moonc
let libmoonbitrun_path =
which::which("moonc").map(|p| p.with_file_name("libmoonbitrun.o"));
if let Err(e) = libmoonbitrun_path {
eprintln!(
"error: 'libmoonbitrun.o' not found in PATH, which is used for native backend release compilation: {}",
e
);
std::process::exit(1);
}
let libmoonbitrun_path = which::which("moonc")
.map(|p| p.with_file_name("libmoonbitrun.o"))
.context("libmoonbitrun.o not found in the same directory as moonc");

let get_default_cc_flags = || -> Option<String> {
#[cfg(unix)]
Expand Down

0 comments on commit d94b8b7

Please sign in to comment.