You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With @Faless we noticed that our optimization flags are passed to the linker currently for Emscripten Web builds, but Emscripten documents that they're needed there too:
Note that there's currently a regression so by default web builds use -O3 instead of -Os (#94087), but in both cases this should be added to the LINKFLAGS.
We should do a review of other emcc flags which need to be passed to both the compiler and the linker (which doesn't seem to be a requirement for GCC/Clang/MSVC, though that assumption might be worth revisiting too).
It does seem to make a significant difference, on a test "minimal" build with:
Tested versions
System information
Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)
Issue description
With @Faless we noticed that our optimization flags are passed to the linker currently for Emscripten Web builds, but Emscripten documents that they're needed there too:
https://emscripten.org/docs/tools_reference/emcc.html#emcc-os
Note that there's currently a regression so by default web builds use
-O3
instead of-Os
(#94087), but in both cases this should be added to theLINKFLAGS
.We should do a review of other emcc flags which need to be passed to both the compiler and the linker (which doesn't seem to be a requirement for GCC/Clang/MSVC, though that assumption might be worth revisiting too).
It does seem to make a significant difference, on a test "minimal" build with:
(which requires adding
env.Append(LINKFLAGS=["-Wl,-u,htonl"])
for LTO to pass)And with a manual fix for #94087, I get the following metrics:
-Os
onCCFLAGS
only:wasm
zip
-Os
onCCFLAGS
andLINKFLAGS
:wasm
zip
Steps to reproduce
scons p=web target=template_release verbose=yes
-O[0-9s]
option on theem++
linking callMinimal reproduction project (MRP)
n/a
The text was updated successfully, but these errors were encountered: