summaryrefslogtreecommitdiffstats
path: root/platform/web/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/web/detect.py')
-rw-r--r--platform/web/detect.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/web/detect.py b/platform/web/detect.py
index 2d2cc288a1..ccd884b225 100644
--- a/platform/web/detect.py
+++ b/platform/web/detect.py
@@ -10,7 +10,7 @@ from emscripten_helpers import (
create_template_zip,
get_template_zip_path,
)
-from methods import get_compiler_version
+from methods import print_warning, print_error, get_compiler_version
from SCons.Util import WhereIs
from typing import TYPE_CHECKING
@@ -85,16 +85,16 @@ def configure(env: "SConsEnvironment"):
# Validate arch.
supported_arches = ["wasm32"]
if env["arch"] not in supported_arches:
- print(
+ print_error(
'Unsupported CPU architecture "%s" for Web. Supported architectures are: %s.'
% (env["arch"], ", ".join(supported_arches))
)
- sys.exit()
+ sys.exit(255)
try:
env["initial_memory"] = int(env["initial_memory"])
except Exception:
- print("Initial memory must be a valid integer")
+ print_error("Initial memory must be a valid integer")
sys.exit(255)
## Build type
@@ -109,7 +109,7 @@ def configure(env: "SConsEnvironment"):
env.Append(LINKFLAGS=["-s", "ASSERTIONS=1"])
if env.editor_build and env["initial_memory"] < 64:
- print('Note: Forcing "initial_memory=64" as it is required for the web editor.')
+ print("Note: Forcing `initial_memory=64` as it is required for the web editor.")
env["initial_memory"] = 64
env.Append(LINKFLAGS=["-s", "INITIAL_MEMORY=%sMB" % env["initial_memory"]])
@@ -227,7 +227,7 @@ def configure(env: "SConsEnvironment"):
env.Append(LINKFLAGS=["-s", "PTHREAD_POOL_SIZE=8"])
env.Append(LINKFLAGS=["-s", "WASM_MEM_MAX=2048MB"])
elif env["proxy_to_pthread"]:
- print('"threads=no" support requires "proxy_to_pthread=no", disabling proxy to pthread.')
+ print_warning('"threads=no" support requires "proxy_to_pthread=no", disabling proxy to pthread.')
env["proxy_to_pthread"] = False
if env["lto"] != "none":
@@ -240,11 +240,11 @@ def configure(env: "SConsEnvironment"):
if env["dlink_enabled"]:
if env["proxy_to_pthread"]:
- print("GDExtension support requires proxy_to_pthread=no, disabling proxy to pthread.")
+ print_warning("GDExtension support requires proxy_to_pthread=no, disabling proxy to pthread.")
env["proxy_to_pthread"] = False
if cc_semver < (3, 1, 14):
- print("GDExtension support requires emscripten >= 3.1.14, detected: %s.%s.%s" % cc_semver)
+ print_error("GDExtension support requires emscripten >= 3.1.14, detected: %s.%s.%s" % cc_semver)
sys.exit(255)
env.Append(CCFLAGS=["-s", "SIDE_MODULE=2"])