fixup! Merge remote-tracking branch 'origin/main' into refactor-platform-info

This commit is contained in:
Richard Feldman 2022-12-10 01:45:31 -05:00
parent 222e0193a3
commit 75891f6755
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -238,13 +238,18 @@ fn create_llvm_module<'a>(
// platform to provide them.
add_default_roc_externs(&env);
let entry_point = match entry_point {
EntryPoint::Executable { symbol, layout, .. } => {
roc_mono::ir::SingleEntryPoint { symbol, layout }
}
EntryPoint::Test => {
unreachable!()
let entry_point = match loaded.entry_point {
EntryPoint::Executable {
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::Single(SingleEntryPoint { symbol, layout })
}
EntryPoint::Test => roc_mono::ir::EntryPoint::Expects { symbols: &[] },
};
let (main_fn_name, main_fn) = match config.mode {
LlvmBackendMode::Binary => unreachable!(),