mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Mark setjmp/longjmp as explicitly linked
This commit is contained in:
parent
3fb1b39871
commit
f19701293c
1 changed files with 10 additions and 2 deletions
|
@ -1401,8 +1401,16 @@ fn surgery_impl(
|
|||
return Ok(-1);
|
||||
}
|
||||
}
|
||||
} else if matches!(app_obj.symbol_by_index(index), Ok(sym) if ["__divti3", "__udivti3"].contains(&sym.name().unwrap_or_default()))
|
||||
{
|
||||
} else if {
|
||||
const ALWAYS_LINKED: &[&str] = &[
|
||||
"__divti3",
|
||||
"__udivti3",
|
||||
// By zig builtins
|
||||
"setjmp",
|
||||
"longjmp",
|
||||
];
|
||||
matches!(app_obj.symbol_by_index(index), Ok(sym) if ALWAYS_LINKED.contains(&sym.name().unwrap_or_default()))
|
||||
} {
|
||||
// Explicitly ignore some symbols that are currently always linked.
|
||||
continue;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue