allow configure of whether roc_alloc is generated

This commit is contained in:
Folkert 2023-04-30 13:53:19 +02:00
parent f921bfc1a7
commit 66be08d073
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
8 changed files with 47 additions and 15 deletions

View file

@ -9,6 +9,7 @@ use roc_cli::{
};
use roc_docs::generate_docs_html;
use roc_error_macros::user_error;
use roc_gen_dev::AssemblyBackendMode;
use roc_gen_llvm::llvm::build::LlvmBackendMode;
use roc_load::{LoadingProblem, Threading};
use roc_packaging::cache::{self, RocCacheDir};
@ -92,8 +93,9 @@ fn main() -> io::Result<()> {
let output_path = Path::new(matches.value_of_os(GLUE_DIR).unwrap());
let spec_path = Path::new(matches.value_of_os(GLUE_SPEC).unwrap());
// have the backend supply `roc_alloc` and friends
let backend = match matches.is_present(FLAG_DEV) {
true => CodeGenBackend::Assembly,
true => CodeGenBackend::Assembly(AssemblyBackendMode::Test),
false => CodeGenBackend::Llvm(LlvmBackendMode::BinaryGlue),
};