Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ See docs/process.md for more on how version tagging works.

4.0.20 (in development)
-----------------------
- Added `emscripten_html5_remove_event_listener` function in `html5.h` in order to be
able to remove a single callback. (#25535)
- Linker flags specified on the command line are now passed to `wasm-ld` after
the internal emscripten linker flags. This means that users can now override
emscripten defaults with things `-Wl,--stack-first`. (#25803)
- Added `emscripten_html5_remove_event_listener` function in `html5.h` in order
to be able to remove a single callback. (#25535)
- The standalone `file_packager.py` script no longer supports `--embed` with JS
output (use `--obj-output` is now required for embedding data). This usage
has been producing a warning since #16050 which is now an error. (#25049)
Expand Down
8 changes: 4 additions & 4 deletions tools/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def lld_flags_for_executable(external_symbols):
c_exports = [e for e in c_exports if e not in external_symbols]
c_exports += settings.REQUIRED_EXPORTS
if settings.MAIN_MODULE:
cmd.append('-Bdynamic')
c_exports += side_module_external_deps(external_symbols)
for export in c_exports:
if settings.ERROR_ON_UNDEFINED_SYMBOLS:
Expand Down Expand Up @@ -296,9 +297,6 @@ def link_lld(args, target, external_symbols=None):
args.insert(0, '--whole-archive')
args.append('--no-whole-archive')

if settings.MAIN_MODULE:
args.insert(0, '-Bdynamic')

if settings.STRICT and '--no-fatal-warnings' not in args:
args.append('--fatal-warnings')

Expand All @@ -307,7 +305,7 @@ def link_lld(args, target, external_symbols=None):
# is passed.
args.append('--keep-section=target_features')

cmd = [WASM_LD, '-o', target] + args
cmd = [WASM_LD, '-o', target]
for a in llvm_backend_args():
cmd += ['-mllvm', a]

Expand All @@ -328,6 +326,8 @@ def link_lld(args, target, external_symbols=None):
if '--relocatable' not in args and '-r' not in args:
cmd += lld_flags_for_executable(external_symbols)

cmd += args

cmd = get_command_with_possible_response_file(cmd)
check_call(cmd)

Expand Down