summaryrefslogtreecommitdiff
path: root/platform/web/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/web/detect.py')
-rw-r--r--platform/web/detect.py23
1 files changed, 7 insertions, 16 deletions
diff --git a/platform/web/detect.py b/platform/web/detect.py
index 9cce73efc4..77921847a8 100644
--- a/platform/web/detect.py
+++ b/platform/web/detect.py
@@ -47,7 +47,7 @@ def get_opts():
def get_flags():
return [
("arch", "wasm32"),
- ("tools", False),
+ ("target", "template_debug"),
("builtin_pcre2_with_jit", False),
("vulkan", False),
# Use -Os to prioritize optimizing for reduced file size. This is
@@ -77,26 +77,17 @@ def configure(env):
sys.exit(255)
## Build type
- if env["target"].startswith("release"):
- if env["optimize"] == "size":
- env.Append(CCFLAGS=["-Os"])
- env.Append(LINKFLAGS=["-Os"])
- elif env["optimize"] == "speed":
- env.Append(CCFLAGS=["-O3"])
- env.Append(LINKFLAGS=["-O3"])
-
- if env["target"] == "release_debug":
- # Retain function names for backtraces at the cost of file size.
- env.Append(LINKFLAGS=["--profiling-funcs"])
- else: # "debug"
- env.Append(CCFLAGS=["-O1", "-g"])
- env.Append(LINKFLAGS=["-O1", "-g"])
+
+ if env.debug_features:
+ # Retain function names for backtraces at the cost of file size.
+ env.Append(LINKFLAGS=["--profiling-funcs"])
+ else:
env["use_assertions"] = True
if env["use_assertions"]:
env.Append(LINKFLAGS=["-s", "ASSERTIONS=1"])
- if env["tools"]:
+ if env.editor_build:
if env["initial_memory"] < 64:
print('Note: Forcing "initial_memory=64" as it is required for the web editor.')
env["initial_memory"] = 64