Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web builds are no longer built with -Os by default #94087

Closed
akien-mga opened this issue Jul 8, 2024 · 1 comment · Fixed by #94107
Closed

Web builds are no longer built with -Os by default #94087

akien-mga opened this issue Jul 8, 2024 · 1 comment · Fixed by #94107

Comments

@akien-mga
Copy link
Member

Tested versions

  • Reproducible in 4.3.beta (ec02d40)

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 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).

if env.dev_build:
    opt_level = "none"
elif env.debug_features:
    opt_level = "speed_trace"
else:  # Release
    opt_level = "speed"

env["optimize"] = ARGUMENTS.get("optimize", opt_level)

ARGUMENTS only includes command line arguments, not overrides taken from detect.py.

One potential solution would be to add a auto mode for optimize, and only do this magic if it's auto.

Steps to reproduce

  • scons p=web target=template_release verbose=yes

Minimal reproduction project (MRP)

n/a

@dsnopek
Copy link
Contributor

dsnopek commented Jul 8, 2024

This is somewhat related to issue #93476, but not entirely

sorascode pushed a commit to sorascode/godot-soras-version that referenced this issue Jul 22, 2024
Akeal pushed a commit to Akeal/godot that referenced this issue Jul 24, 2024
Luis-Wong pushed a commit to Luis-Wong/godot that referenced this issue Jul 26, 2024
RadiantUwU pushed a commit to RadiantUwU/godot that referenced this issue Jul 27, 2024
2nafish117 pushed a commit to 2nafish117/godot that referenced this issue Aug 5, 2024
chryan pushed a commit to chryan/godot that referenced this issue Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Development

Successfully merging a pull request may close this issue.

2 participants