split up bitcode building to reduce dependency chains

This commit is contained in:
Brendan Hansknecht 2023-03-09 23:28:53 -08:00
parent 24c7bded35
commit d5e191d083
No known key found for this signature in database
GPG key ID: A199D0660F95F948
18 changed files with 418 additions and 140 deletions

View file

@ -1,6 +1,5 @@
use crate::target::{arch_str, target_zig_str};
use libloading::{Error, Library};
use roc_builtins::bitcode;
use roc_error_macros::internal_error;
use roc_mono::ir::OptLevel;
use roc_utils::{cargo, clang, zig};
@ -556,7 +555,7 @@ pub fn rebuild_host(
let env_cpath = env::var("CPATH").unwrap_or_else(|_| "".to_string());
let builtins_host_tempfile =
bitcode::host_tempfile().expect("failed to write host builtins object to tempfile");
roc_bitcode::host_tempfile().expect("failed to write host builtins object to tempfile");
if zig_host_src.exists() {
// Compile host.zig
@ -1435,8 +1434,8 @@ pub fn preprocess_host_wasm32(host_input_path: &Path, preprocessed_host_path: &P
(but seems to be an unofficial API)
*/
let builtins_host_tempfile =
bitcode::host_wasm_tempfile().expect("failed to write host builtins object to tempfile");
let builtins_host_tempfile = roc_bitcode::host_wasm_tempfile()
.expect("failed to write host builtins object to tempfile");
let mut zig_cmd = zig();
let args = &[