Skip to content

Commit

Permalink
Link shared libraries with --unresolved-symbols=import-dynamic. NFC
Browse files Browse the repository at this point in the history
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 emscripten-core#18198
  • Loading branch information
sbc100 committed Nov 28, 2023
1 parent 1efebf3 commit 10e76c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def lld_flags_for_executable(external_symbols):

if settings.RELOCATABLE:
cmd.append('--experimental-pic')
cmd.append('--unresolved-symbols=import-dynamic')
if settings.SIDE_MODULE:
cmd.append('-shared')
else:
Expand Down

0 comments on commit 10e76c1

Please sign in to comment.