add missing symbols to dev object files on unix

This commit is contained in:
Brendan Hansknecht 2023-05-01 08:38:23 -07:00
parent d3a85e9ce5
commit 2769f3dc60
No known key found for this signature in database
GPG key ID: A199D0660F95F948

View file

@ -214,6 +214,22 @@ fn build_object<'a, B: Backend<'a>>(
"roc_panic".into(),
"roc_builtins.utils.test_panic".into(),
);
// Extra symbols only required on unix systems.
if matches!(output.format(), BinaryFormat::Elf | BinaryFormat::MachO) {
generate_wrapper(
&mut backend,
&mut output,
"roc_getppid".into(),
"getppid".into(),
);
generate_wrapper(&mut backend, &mut output, "roc_mmap".into(), "mmap".into());
generate_wrapper(
&mut backend,
&mut output,
"roc_shm_open".into(),
"shm_open".into(),
);
}
}
// Setup layout_ids for procedure calls.