Make entry points optional in code gen

This commit is contained in:
Richard Feldman 2022-08-03 19:47:16 -04:00
parent e685eba42b
commit d260d1e593
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
4 changed files with 41 additions and 35 deletions

View file

@ -299,13 +299,11 @@ pub fn expect_mono_module_to_dylib<'a>(
// platform to provide them.
add_default_roc_externs(&env);
let entry_point = match entry_point {
let opt_entry_point = match entry_point {
EntryPoint::Executable { symbol, layout, .. } => {
roc_mono::ir::EntryPoint { symbol, layout }
}
EntryPoint::Test => {
unreachable!()
Some(roc_mono::ir::EntryPoint { symbol, layout })
}
EntryPoint::Test => None,
};
let expect_names = roc_gen_llvm::llvm::build::build_procedures_expose_expects(
@ -313,7 +311,7 @@ pub fn expect_mono_module_to_dylib<'a>(
opt_level,
toplevel_expects.unzip_slices().0,
procedures,
entry_point,
opt_entry_point,
);
let expects = bumpalo::collections::Vec::from_iter_in(