clean up expect code when not running tests

This commit is contained in:
Folkert 2022-07-27 12:26:03 +02:00
parent 91ea71c7aa
commit 498004c554
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 11 additions and 4 deletions

View file

@ -1,5 +1,6 @@
pub use roc_gen_llvm::llvm::build::FunctionIterator;
use roc_gen_llvm::llvm::build::{module_from_builtins, LlvmBackendMode};
use roc_gen_llvm::llvm::externs::add_default_roc_externs;
use roc_load::{LoadedModule, MonomorphizedModule};
use roc_module::symbol::{Interns, ModuleId};
use roc_mono::ir::OptLevel;
@ -259,6 +260,10 @@ pub fn gen_from_mono_module_llvm(
exposed_to_host: loaded.exposed_to_host.values.keys().copied().collect(),
};
// does not add any externs for this mode (we have a host) but cleans up some functions around
// expects that would confuse the surgical linker
add_default_roc_externs(&env);
roc_gen_llvm::llvm::build::build_procedures(
&env,
opt_level,