mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Use include_bytes! so builtin hosts live in binary
This commit is contained in:
parent
a90d9d465d
commit
e97a5fe7f6
11 changed files with 72 additions and 65 deletions
|
@ -13,9 +13,10 @@ crate-type = ["cdylib"]
|
|||
roc_builtins = {path = "../compiler/builtins"}
|
||||
roc_utils = {path = "../utils"}
|
||||
wasi_libc_sys = { path = "../wasi-libc-sys" }
|
||||
tempfile.workspace = true
|
||||
|
||||
[dependencies]
|
||||
bumpalo.workspace = true
|
||||
bumpalo.workspace = true
|
||||
console_error_panic_hook = {version = "0.1.7", optional = true}
|
||||
futures = {version = "0.3.24", optional = true}
|
||||
js-sys = "0.3.60"
|
||||
|
|
|
@ -23,10 +23,14 @@ fn main() {
|
|||
pre_linked_binary_path.extend(["pre_linked_binary"]);
|
||||
pre_linked_binary_path.set_extension("o");
|
||||
|
||||
let builtins_host_file = tempfile::NamedTempFile::new().unwrap();
|
||||
std::fs::write(builtins_host_file.path(), bitcode::HOST_WASM)
|
||||
.expect("failed to write host builtins object to tempfile");
|
||||
|
||||
let output = Command::new(&zig_executable())
|
||||
.args([
|
||||
"wasm-ld",
|
||||
&bitcode::get_builtins_wasm32_obj_path(),
|
||||
builtins_host_file.path().to_str().unwrap(),
|
||||
platform_obj.to_str().unwrap(),
|
||||
WASI_COMPILER_RT_PATH,
|
||||
WASI_LIBC_PATH,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue