mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
use zig wasm-ld
This commit is contained in:
parent
b416e854ef
commit
2e91914443
1 changed files with 23 additions and 2 deletions
|
@ -366,9 +366,13 @@ pub fn helper_wasm<'a>(
|
|||
|
||||
use std::process::Command;
|
||||
|
||||
Command::new("/opt/wasi-sdk/bin/clang")
|
||||
// Command::new("/opt/wasi-sdk/bin/clang")
|
||||
|
||||
/*
|
||||
Command::new("zig")
|
||||
.current_dir(dir_path)
|
||||
.args(&[
|
||||
"cc",
|
||||
"/home/folkertdev/roc/wasm/libmain.a",
|
||||
test_a_path.to_str().unwrap(),
|
||||
"-target",
|
||||
|
@ -377,12 +381,29 @@ pub fn helper_wasm<'a>(
|
|||
test_wasm_path.to_str().unwrap(),
|
||||
"--sysroot=/opt/wasi-sdk/share/wasi-sysroot/",
|
||||
"-Xlinker", "--export-dynamic",
|
||||
"-Xlinker", "--allow-undefined"
|
||||
// "-Xlinker", "--allow-undefined"
|
||||
// "--global-cache-dir",
|
||||
// zig_global_cache_path.to_str().unwrap(),
|
||||
])
|
||||
.status()
|
||||
.unwrap();
|
||||
*/
|
||||
|
||||
Command::new("/home/folkertdev/Downloads/zig-linux-x86_64-0.9.0-dev.848+d5ef5da59/zig")
|
||||
.current_dir(dir_path)
|
||||
.args(&[
|
||||
"wasm-ld",
|
||||
"/home/folkertdev/roc/wasm/libmain.a",
|
||||
"/home/folkertdev/roc/wasm/libc.a",
|
||||
test_a_path.to_str().unwrap(),
|
||||
"-o",
|
||||
test_wasm_path.to_str().unwrap(),
|
||||
"--export-dynamic",
|
||||
"--allow-undefined",
|
||||
"--no-entry",
|
||||
])
|
||||
.status()
|
||||
.unwrap();
|
||||
|
||||
/*
|
||||
Command::new("/home/folkertdev/Downloads/zig-linux-x86_64-0.9.0-dev.848+d5ef5da59/zig")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue