Skip to content

Commit 0bb1f13

Browse files
committed
Merge pull request #100525 from adamscott/set-closure-language-to-default
Remove custom `--language-in` arg for the Closure compiler
2 parents 5280c0b + 3011717 commit 0bb1f13

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

platform/web/SCsub

+4
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ for lib in sys_env["JS_LIBS"]:
6161
sys_env.Append(LINKFLAGS=["--js-library", lib.abspath])
6262
for js in sys_env["JS_PRE"]:
6363
sys_env.Append(LINKFLAGS=["--pre-js", js.abspath])
64+
65+
# Add JS externs to Closure.
66+
sys_env["ENV"]["EMCC_CLOSURE_ARGS"] = sys_env["ENV"].get("EMCC_CLOSURE_ARGS", "")
6467
for ext in sys_env["JS_EXTERNS"]:
6568
sys_env["ENV"]["EMCC_CLOSURE_ARGS"] += " --externs " + ext.abspath
69+
sys_env["ENV"]["EMCC_CLOSURE_ARGS"] = sys_env["ENV"]["EMCC_CLOSURE_ARGS"].strip()
6670

6771
build = []
6872
build_targets = ["#bin/godot${PROGSUFFIX}.js", "#bin/godot${PROGSUFFIX}.wasm"]

platform/web/detect.py

-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ def configure(env: "SConsEnvironment"):
171171
# Add method for creating the final zip file
172172
env.AddMethod(create_template_zip, "CreateTemplateZip")
173173

174-
# Closure compiler extern and support for ecmascript specs (const, let, etc).
175-
env["ENV"]["EMCC_CLOSURE_ARGS"] = "--language_in ECMASCRIPT_2021"
176-
177174
env["CC"] = "emcc"
178175
env["CXX"] = "em++"
179176

0 commit comments

Comments
 (0)