mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
split up bitcode building to reduce dependency chains
This commit is contained in:
parent
24c7bded35
commit
d5e191d083
18 changed files with 418 additions and 140 deletions
|
@ -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 = &[
|
||||
|
|
|
@ -3,7 +3,6 @@ use crate::link::{
|
|||
};
|
||||
use bumpalo::Bump;
|
||||
use inkwell::memory_buffer::MemoryBuffer;
|
||||
use roc_builtins::bitcode;
|
||||
use roc_error_macros::internal_error;
|
||||
use roc_gen_llvm::llvm::build::{module_from_builtins, LlvmBackendMode};
|
||||
use roc_gen_llvm::llvm::externs::add_default_roc_externs;
|
||||
|
@ -938,8 +937,8 @@ fn build_loaded_file<'a>(
|
|||
|
||||
std::fs::write(app_o_file, &*roc_app_bytes).unwrap();
|
||||
|
||||
let builtins_host_tempfile =
|
||||
bitcode::host_tempfile().expect("failed to write host builtins object to tempfile");
|
||||
let builtins_host_tempfile = roc_bitcode::host_tempfile()
|
||||
.expect("failed to write host builtins object to tempfile");
|
||||
|
||||
let mut inputs = vec![app_o_file.to_str().unwrap()];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue