Skip to content

Commit af763a9

Browse files
authored
Fix embind+lto link failure (#21654)
This was broken by #21639 which means were accidentally depending on embind being included using `--whole-archive` previously. See #21653
1 parent 09c208d commit af763a9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ jobs:
551551
lto2.test_float_builtins
552552
lto0.test_exceptions_allowed_uncaught
553553
lto0.test_longjmp_standalone_standalone
554+
lto0.test_embind_i64_val
554555
core3
555556
core2g.test_externref
556557
corez.test_dylink_iostream

tools/link.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,11 @@ def phase_linker_setup(options, state, newargs):
13421342
if state.has_link_flag('-lembind'):
13431343
settings.EMBIND = 1
13441344

1345+
if settings.EMBIND:
1346+
# Workaround for embind+LTO issue:
1347+
# https://github.com/emscripten-core/emscripten/issues/21653
1348+
settings.REQUIRED_EXPORTS.append('__getTypeName')
1349+
13451350
if options.emit_tsd:
13461351
settings.EMIT_TSD = True
13471352

0 commit comments

Comments
 (0)