mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-22 04:44:06 +00:00
make gen tests expose mainForHost like LLVM backend
This commit is contained in:
parent
692ddc4c2e
commit
539d90b62e
2 changed files with 9 additions and 3 deletions
|
@ -191,10 +191,16 @@ fn build_object<'a, B: Backend<'a>>(
|
|||
let mut layout_ids = roc_mono::layout::LayoutIds::default();
|
||||
let mut procs = Vec::with_capacity_in(procedures.len(), env.arena);
|
||||
for ((sym, layout), proc) in procedures {
|
||||
let fn_name = layout_ids
|
||||
let base_name = layout_ids
|
||||
.get_toplevel(sym, &layout)
|
||||
.to_symbol_string(sym, &env.interns);
|
||||
|
||||
let fn_name = if env.exposed_to_host.contains(&sym) {
|
||||
format!("roc_{}_exposed", base_name)
|
||||
} else {
|
||||
base_name
|
||||
};
|
||||
|
||||
let section_id = output.add_section(
|
||||
output.segment_name(StandardSegment::Text).to_vec(),
|
||||
format!(".text.{:x}", sym.as_u64()).as_bytes().to_vec(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue