mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Split out an optional "llvm" feature
Also move OptLevel out of roc_gen (which should really be called gen_llvm) and into roc_mono, so it's no longer coupled to LLVM.
This commit is contained in:
parent
0e5619c422
commit
b05342c678
14 changed files with 143 additions and 76 deletions
|
@ -6,6 +6,7 @@ use roc_can::def::Def;
|
|||
use roc_collections::all::{MutMap, MutSet};
|
||||
use roc_gen::llvm::externs::add_default_roc_externs;
|
||||
use roc_module::symbol::Symbol;
|
||||
use roc_mono::ir::OptLevel;
|
||||
use roc_types::subs::VarStore;
|
||||
|
||||
fn promote_expr_to_module(src: &str) -> String {
|
||||
|
@ -190,9 +191,9 @@ pub fn helper<'a>(
|
|||
module.strip_debug_info();
|
||||
|
||||
let opt_level = if cfg!(debug_assertions) {
|
||||
roc_gen::llvm::build::OptLevel::Normal
|
||||
OptLevel::Normal
|
||||
} else {
|
||||
roc_gen::llvm::build::OptLevel::Optimize
|
||||
OptLevel::Optimize
|
||||
};
|
||||
|
||||
let module = arena.alloc(module);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue