When building for Web with scons p=web target=template_release verbose=yes, you should see it use -Os as optimization, which is set as custom value for env["optimize"] in platform/web/detect.py.
But I broke it with one of my PRs in 4.3 (likely #91791) so now this override is no longer respected and instead this code in SConstruct forces it to speed (which is the default on other platforms for release templates).
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
When building for Web with
scons p=web target=template_release verbose=yes
, you should see it use-Os
as optimization, which is set as custom value forenv["optimize"]
inplatform/web/detect.py
.But I broke it with one of my PRs in 4.3 (likely #91791) so now this override is no longer respected and instead this code in
SConstruct
forces it tospeed
(which is the default on other platforms for release templates).ARGUMENTS
only includes command line arguments, not overrides taken fromdetect.py
.One potential solution would be to add a
auto
mode foroptimize
, and only do this magic if it'sauto
.Steps to reproduce
scons p=web target=template_release verbose=yes
Minimal reproduction project (MRP)
n/a