Skip to content

Commit 58cf85c

Browse files
authored
Link shared libraries with --unresolved-symbols=import-dynamic. NFC (#20795)
This is currently the default for shared libraries and PIC executables in the linker but I'm hoping to change that soon. This change means emscripten will not get broken if/when that happens. See #18198
1 parent 9d830e2 commit 58cf85c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/building.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def lld_flags_for_executable(external_symbols):
206206

207207
if settings.RELOCATABLE:
208208
cmd.append('--experimental-pic')
209+
cmd.append('--unresolved-symbols=import-dynamic')
209210
if settings.SIDE_MODULE:
210211
cmd.append('-shared')
211212
else:

0 commit comments

Comments
 (0)