Prevent frontend function confusion (#383)

Function symbols can clash as we compile multiple YUL `object`
definition into the same `LLVM` module.
- Disambiguate via unique function symbols based its location (runtime
or deploy code).
- Use `LinkOnceODR` linkage for compiler builtin helpers.

---------

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus
2025-09-29 23:05:57 +02:00
committed by GitHub
parent 6858cb9a61
commit b560d72139
12 changed files with 103 additions and 58 deletions
@@ -210,7 +210,7 @@ pub fn load<'ctx>(
let name = <Load as RuntimeFunction>::NAME;
context.build_call(
context
.get_function(name)
.get_function(name, false)
.expect("is always declared for runtime code")
.borrow()
.declaration(),