Skip to content

Update emsdk version from d140a29c to f0cf44cc - #28352

Merged
emscripten-bot merged 1 commit into
mainfrom
update_emsdk
Nov 23, 2026
Merged

emscripten-bot merged 1 commit into
mainfrom
update_emsdk

Conversation

@emscripten-bot

@emscripten-bot emscripten-bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

This is an automatic change generated by tools/maint/rebaseline_tests.py --update-emsdk.

Additionally, build the JS-exceptions libc++ variant in
tools/system_libs.py with -fno-module-local-hints. Upstream LLVM
enabled -fmodule-local-hints by default (llvm/llvm-project#238529),
which caused a +809 byte codesize regression under JS exceptions due
to inlining single-call-site helpers duplicating invoke wrappers,
while noexcept and Wasm exceptions libc++ variants see a net size
reduction.

emsdk version updated: d140a29c => f0cf44cc

The following revisions were included in this update:

- f0cf44cc Roll llvm-project from 950baabb7fdf to c620a424a90a (20 revisions)
- c3d64cd4 Roll llvm-project from 5e410254168a to 950baabb7fdf (11 revisions)
- 5e44e028 Roll llvm-project from 18867a59d17a to 5e410254168a (12 revisions)
- 42ac2802 Roll emscripten from 4e590ffdf1a4 to 49421518749b (3 revisions)
- 2bb84944 Roll v8 from f4bfd902e1c4 to 4f01bdeb2725 (2 revisions)
- 2d9e3ffe Roll emscripten from fc87b8734780 to 4e590ffdf1a4 (3 revisions)
- 018e72fa Roll llvm-project from f1afebcbe1c6 to 18867a59d17a (11 revisions)
- 2f468a0e Roll llvm-project from 8f7eb6f677a2 to f1afebcbe1c6 (4 revisions)
- 00524468 Roll llvm-project from cc5ed0cebe3e to 8f7eb6f677a2 (8 revisions)
- d0efbc8e Roll llvm-project from 1625c1a53d61 to cc5ed0cebe3e (7 revisions)
- 69b93276 Roll llvm-project from b6f762dad029 to 1625c1a53d61 (17 revisions)
- e2fd0fda Roll emscripten from 343150f84e7b to fc87b8734780 (1 revision)
- 0a85dec7 Roll llvm-project from 4c01a2991df8 to b6f762dad029 (15 revisions)
- e4066aa4 Roll binaryen from 4408fed200e9 to 89157cb30824 (1 revision)
- 9a73748e Fix version in DEPS.tagged-release
- ab27b19e Roll emscripten from c7360e7d3bd1 to 343150f84e7b (1 revision)
- b18ce50f Roll v8 from 8b413f7c8252 to f4bfd902e1c4 (18 revisions)
- 44b4cd37 Roll llvm-project from 87764a902a9b to 4c01a2991df8 (9 revisions)
- 302dfa3a Roll emscripten from 68f53bd7e9f9 to c7360e7d3bd1 (2 revisions)
- 39536303 Roll emscripten from de59e7b78a0b to 68f53bd7e9f9 (1 revision)
- 3c226351 Roll llvm-project from aab5b2033768 to 87764a902a9b (19 revisions)
- 9a4d68c3 Roll llvm-project from 0d8ca1bd8eec to aab5b2033768 (6 revisions)
- af31a894 Roll emscripten from 4d96a3553989 to de59e7b78a0b (1 revision)
- 0a12a760 Roll llvm-project from d361f7b3f594 to 0d8ca1bd8eec (13 revisions)
- 186239e2 Roll emscripten from ac0578743420 to 4d96a3553989 (5 revisions)
- 80803a3e Roll binaryen from e7a4b90f3c63 to 4408fed200e9 (1 revision)
- 9146b21a Version 7.0.1 RC3
- 0d19b078 Roll llvm-project from 61c665e40ec9 to d361f7b3f594 (35 revisions)
- 9d8afc53 Fix disabling Xcode libtool in macOS LLVM builds
- c1934886 Roll binaryen from d1ce9a596ee8 to e7a4b90f3c63 (1 revision)
  ... (and more, see full log)

Full log: https://chromium.googlesource.com/emscripten-releases/+log/d140a29c..f0cf44cc

The following (5) test expectation files were updated by
running the tests with --rebaseline:

codesize/test_codesize_cxx_except_wasm.json: 168668 => 168670 [+2 bytes / +0.00%]
codesize/test_codesize_cxx_except_wasm_legacy.json: 166527 => 166529 [+2 bytes / +0.00%]
codesize/test_codesize_cxx_noexcept.json: 155062 => 155066 [+4 bytes / +0.00%]
codesize/test_codesize_cxx_wasmfs.json: 181302 => 181306 [+4 bytes / +0.00%]
codesize/test_minimal_runtime_code_size_hello_embind.json: 15044 => 15044 [+0 bytes / +0.00%]

Average change: +0.00% (+0.00% - +0.00%)

@emscripten-bot
emscripten-bot enabled auto-merge (squash) November 21, 2026 10:40
@emscripten-bot emscripten-bot changed the title Update emsdk version from d140a29c to af31a894 Update emsdk version from d140a29c to 00524468 Nov 22, 2026
@sbc100

sbc100 commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

I wonder where these 800 bytes of regression are coming from..

@juj

juj commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

I wonder where these 800 bytes of regression are coming from..

I passed this question on to Claude Fable 5.2 It came back with:


The +809 bytes come from a single upstream LLVM change: llvm/llvm-project@67cc115 "[Clang][Inliner] Enable module-local optimizer hints by default" (llvm/llvm-project#238529). It arrived in the first LLVM roll of this range (07e7c3133855..fc6cf640ba0c, 295 revisions). Binaryen is not involved.

What happens

  • The new default: Clang now tags inline functions and template instantiations that are defined in the main source file with a new likely_module_local function attribute (-fmodule-local-hints, introduced off-by-default in [clang][Inliner] Add opt-in inliner hints and implementation-file functions llvm/llvm-project#228074). The inliner then gives a linkonce_odr function carrying that attribute the "sole call to a local function" bonus, which inlines it regardless of cost, even at -Oz.
  • Where it bites: libc++'s locale.cpp has this template helper:
    template <class F>
    void install(F* f) {
      install(f, f->id.__get());
    }
    Each facet instantiation has exactly one call site in the locale::__imp constructor, so 30 of them now get inlined into std::locale::__global().
  • Why that costs bytes only with JS exceptions: before, each site was one invoke_vii to the 17-byte helper. Now each site is two invokes (invoke_ii for locale::id::__get() and invoke_viii for install(facet*, long)), each with its own __THREW__ reset, load and branch.

Direct calls in std::locale::__global(), old vs. new:

old new
invoke_vii 30 0
invoke_ii 0 30
invoke_viii 0 30
other 11 11

Size accounting (test_codesize_cxx_except)

Item Bytes
std::locale::__global() grows 2472 → 3882 +1410
30 locale::__imp::install<F>(F*) helpers removed (17 bytes each) −510
__wasm_call_ctors −4
Function, element and data sections (30 fewer functions / table entries) −87
Net +809

test_codesize_cxx_mangle has the identical +809 delta, so it is the same cause.

Verification

I reproduced the numbers in this PR locally at emscripten fc87b87 with the prebuilt emscripten-releases toolchains, and then flipped only the flag, rebuilding the system libraries each time:

Toolchain Flag cxx_except a.out.nodebug.wasm
old (d140a29c) default 174535
new (00524468) default 175344
new (00524468) -fno-module-local-hints 174535
old (d140a29c) -fmodule-local-hints 175344

The match is byte-exact in both directions. Mixing new LLVM with old Binaryen gives 175344, and old LLVM with new Binaryen gives 174535, which rules Binaryen out.

Flipping the flag on the new toolchain also restores the old sizes for cxx_noexcept (135996 → 135992) and cxx_except_wasm (149801 → 149799), so the +2/+4 byte changes share the same cause. I did not rerun the wasmfs, except_wasm_legacy or hello_embind variants.

Is it worth acting on?

  • Gzipped size went down in the two affected tests (58664 → 58528 for cxx_except), since the repeated invoke sequences compress well.

  • The hint is a net win elsewhere. Total CODE section size of the libc++ archives, new toolchain, hints off → on:

    Library hints off hints on delta
    libc++-noexcept.a 356104 354743 −1361
    libc++-wasmexcept.a 420028 418872 −1156
    libc++.a (JS exceptions) 510104 513017 +2913

If we wanted the bytes back, the narrowest option would be to build only the JS-exceptions libc++ variant with -fno-module-local-hints in tools/system_libs.py. I have only tested the flag applied to all system libraries, not that variant-only change.

This is an automatic change generated by tools/maint/rebaseline_tests.py --update-emsdk.

emsdk version updated: d140a29c => f0cf44cc

The following revisions were included in this update:

```
- f0cf44cc Roll llvm-project from 950baabb7fdf to c620a424a90a (20 revisions)
- c3d64cd4 Roll llvm-project from 5e410254168a to 950baabb7fdf (11 revisions)
- 5e44e028 Roll llvm-project from 18867a59d17a to 5e410254168a (12 revisions)
- 42ac2802 Roll emscripten from 4e590ff to 4942151 (3 revisions)
- 2bb84944 Roll v8 from f4bfd902e1c4 to 4f01bdeb2725 (2 revisions)
- 2d9e3ffe Roll emscripten from fc87b87 to 4e590ff (3 revisions)
- 018e72fa Roll llvm-project from f1afebcbe1c6 to 18867a59d17a (11 revisions)
- 2f468a0e Roll llvm-project from 8f7eb6f677a2 to f1afebcbe1c6 (4 revisions)
- 00524468 Roll llvm-project from cc5ed0cebe3e to 8f7eb6f677a2 (8 revisions)
- d0efbc8e Roll llvm-project from 1625c1a53d61 to cc5ed0cebe3e (7 revisions)
- 69b93276 Roll llvm-project from b6f762dad029 to 1625c1a53d61 (17 revisions)
- e2fd0fda Roll emscripten from 343150f to fc87b87 (1 revision)
- 0a85dec7 Roll llvm-project from 4c01a2991df8 to b6f762dad029 (15 revisions)
- e4066aa4 Roll binaryen from 4408fed200e9 to 89157cb30824 (1 revision)
- 9a73748e Fix version in DEPS.tagged-release
- ab27b19e Roll emscripten from c7360e7 to 343150f (1 revision)
- b18ce50f Roll v8 from 8b413f7c8252 to f4bfd902e1c4 (18 revisions)
- 44b4cd37 Roll llvm-project from 87764a902a9b to 4c01a2991df8 (9 revisions)
- 302dfa3a Roll emscripten from 68f53bd to c7360e7 (2 revisions)
- 39536303 Roll emscripten from de59e7b to 68f53bd (1 revision)
- 3c226351 Roll llvm-project from aab5b2033768 to 87764a902a9b (19 revisions)
- 9a4d68c3 Roll llvm-project from 0d8ca1bd8eec to aab5b2033768 (6 revisions)
- af31a894 Roll emscripten from 4d96a35 to de59e7b (1 revision)
- 0a12a760 Roll llvm-project from d361f7b3f594 to 0d8ca1bd8eec (13 revisions)
- 186239e Roll emscripten from ac05787 to 4d96a35 (5 revisions)
- 80803a3e Roll binaryen from e7a4b90f3c63 to 4408fed200e9 (1 revision)
- 9146b21a Version 7.0.1 RC3
- 0d19b078 Roll llvm-project from 61c665e40ec9 to d361f7b3f594 (35 revisions)
- 9d8afc53 Fix disabling Xcode libtool in macOS LLVM builds
- c1934886 Roll binaryen from d1ce9a596ee8 to e7a4b90f3c63 (1 revision)
  ... (and more, see full log)
```

Full log: https://chromium.googlesource.com/emscripten-releases/+log/d140a29c..f0cf44cc

The following (7) test expectation files were updated by
running the tests with `--rebaseline`:

```
codesize/test_codesize_cxx_except.json: 197298 => 198107 [+809 bytes / +0.41%]
codesize/test_codesize_cxx_except_wasm.json: 168668 => 168670 [+2 bytes / +0.00%]
codesize/test_codesize_cxx_except_wasm_legacy.json: 166527 => 166529 [+2 bytes / +0.00%]
codesize/test_codesize_cxx_mangle.json: 264408 => 265217 [+809 bytes / +0.31%]
codesize/test_codesize_cxx_noexcept.json: 155062 => 155066 [+4 bytes / +0.00%]
codesize/test_codesize_cxx_wasmfs.json: 181302 => 181306 [+4 bytes / +0.00%]
codesize/test_minimal_runtime_code_size_hello_embind.json: 15044 => 15044 [+0 bytes / +0.00%]

Average change: +0.10% (+0.00% - +0.41%)
```
@emscripten-bot emscripten-bot changed the title Update emsdk version from d140a29c to 00524468 Update emsdk version from d140a29c to f0cf44cc Nov 23, 2026
@sbc100

sbc100 commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Gemini agreed with claude and update this PR accordingly.

@emscripten-bot
emscripten-bot merged commit c3cc134 into main Nov 23, 2026
46 checks passed
@emscripten-bot
emscripten-bot deleted the update_emsdk branch November 23, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants