Go back to old opt_main_for_host

This commit is contained in:
Richard Feldman 2022-12-09 22:04:36 -05:00
parent bff3204727
commit 63e9f5da8c
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
7 changed files with 74 additions and 59 deletions

View file

@ -233,10 +233,17 @@ fn mono_module_to_dylib<'a>(
// platform to provide them.
add_default_roc_externs(&env);
let entry_points = match entry_point {
let entry_point = match entry_point {
EntryPoint::Executable {
exposed_to_host, ..
} => exposed_to_host,
exposed_to_host,
platform_path: _,
} => {
// TODO support multiple of these!
debug_assert_eq!(exposed_to_host.len(), 1);
let (symbol, layout) = exposed_to_host[0];
roc_mono::ir::EntryPoint { symbol, layout }
}
EntryPoint::Test => {
unreachable!()
}
@ -246,7 +253,7 @@ fn mono_module_to_dylib<'a>(
&env,
opt_level,
procedures,
entry_points,
entry_point,
);
env.dibuilder.finalize();