diff options
| author | Rémi Verschelde | 2018-01-07 17:47:15 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-07 17:47:15 +0100 |
| commit | 4ab4001ab2ceb2aefcd8c148705b5de51152cac9 (patch) | |
| tree | c2c52b175a0f17e1dc56dd1fcecaa942a9ab407e /platform/javascript | |
| parent | 22f2f403acea07d1831e6daa3f93c8ea57776dbd (diff) | |
| parent | 4211e4453e79d884188d314416fa95693a3678d9 (diff) | |
| download | godot-4ab4001ab2ceb2aefcd8c148705b5de51152cac9.tar.gz godot-4ab4001ab2ceb2aefcd8c148705b5de51152cac9.tar.zst godot-4ab4001ab2ceb2aefcd8c148705b5de51152cac9.zip | |
Diffstat (limited to 'platform/javascript')
| -rw-r--r-- | platform/javascript/detect.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 8472c3cca..8c7a904bc 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -49,8 +49,14 @@ def configure(env): ## Build type if (env["target"] == "release"): - env.Append(CCFLAGS=['-O3']) - env.Append(LINKFLAGS=['-O3']) + # Use -Os to prioritize optimizing for reduced file size. This is + # particularly valuable for the web platform because it directly + # decreases download time. + # -Os reduces file size by around 5 MiB over -O3. -Oz only saves about + # 100 KiB over -Os, which does not justify the negative impact on + # run-time performance. + env.Append(CCFLAGS=['-Os']) + env.Append(LINKFLAGS=['-Os']) elif (env["target"] == "release_debug"): env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED']) |
