mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
Use gcc instead of cc, fix wasmer/lib/c-api in wasmer_base_dir string
This commit is contained in:
@@ -480,9 +480,14 @@ impl CreateExe {
|
||||
include_dir.pop();
|
||||
include_dir.push("include");
|
||||
|
||||
let compiler_cmd = match std::process::Command::new("cc").output() {
|
||||
Ok(_) => "cc",
|
||||
Err(_) => "gcc",
|
||||
};
|
||||
|
||||
let mut cmd = Command::new(zig_binary_path);
|
||||
let mut cmd_mut: &mut Command = cmd
|
||||
.arg("cc")
|
||||
.arg(compiler_cmd)
|
||||
.arg("-w")
|
||||
.arg("-fgnu-inline-asm")
|
||||
.arg("-fsanitize=undefined")
|
||||
@@ -549,7 +554,13 @@ impl CreateExe {
|
||||
|
||||
/* Compile main function */
|
||||
let compilation = {
|
||||
Command::new("cc")
|
||||
|
||||
let compiler_cmd = match Command::new("cc").output() {
|
||||
Ok(_) => "cc",
|
||||
Err(_) => "gcc",
|
||||
};
|
||||
|
||||
Command::new(compiler_cmd)
|
||||
.arg("-c")
|
||||
.arg(&c_src_path)
|
||||
.arg(if linkcode.optimization_flag.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user