mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
fix: use path finder everywhere, fix get_relative_path() call
This commit is contained in:
parent
96ac005632
commit
1858fc90e1
1 changed files with 4 additions and 2 deletions
|
@ -127,7 +127,7 @@ fn find_wasi_libc_path() -> PathBuf {
|
|||
}
|
||||
|
||||
// This path is available in the release tarball
|
||||
match get_relative_path(Path::new("wasi-libc.a")) {
|
||||
match get_relative_path(Path::new("lib/wasi-libc.a")) {
|
||||
Some(path) if path.exists() => return path,
|
||||
_ => (),
|
||||
}
|
||||
|
@ -1352,12 +1352,14 @@ pub fn preprocess_host_wasm32(host_input_path: &Path, preprocessed_host_path: &P
|
|||
let builtins_host_tempfile = roc_bitcode::host_wasm_tempfile()
|
||||
.expect("failed to write host builtins object to tempfile");
|
||||
|
||||
let wasi_libc_path = find_wasi_libc_path();
|
||||
|
||||
let mut zig_cmd = zig();
|
||||
let args = &[
|
||||
"wasm-ld",
|
||||
builtins_host_tempfile.path().to_str().unwrap(),
|
||||
host_input,
|
||||
WASI_LIBC_PATH,
|
||||
wasi_libc_path.to_str().unwrap(),
|
||||
WASI_COMPILER_RT_PATH, // builtins need __multi3, __udivti3, __fixdfti
|
||||
"-o",
|
||||
output_file,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue