add some missed symbols that roc needs

This commit is contained in:
Brendan Hansknecht 2023-12-09 18:33:23 -08:00
parent e621de328d
commit 1ad9933b38
No known key found for this signature in database
GPG Key ID: 0EA784685083E75B

View File

@ -1067,7 +1067,16 @@ pub fn module_from_builtins<'ctx>(
// Also, must_keep is the functions we depend on that would normally be provide by libc.
// They are magically linked to by llvm builtins, so we must specify that they can't be DCE'd.
let must_keep = ["memcpy", "memset", "floorf"];
let must_keep = [
"_fltused",
"floorf",
"memcpy",
"memset",
// Roc special functions
"__roc_force_longjmp",
"__roc_force_setjmp",
"set_shared_buffer",
];
for func in module.get_functions() {
let has_definition = func.count_basic_blocks() > 0;
let name = func.get_name().to_string_lossy();