Skip to content

Commit ce4f645

Browse files
committed
Add the equivalent of -Werror for wasm-ld
1 parent af2c713 commit ce4f645

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

platform/web/detect.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ def configure(env: "SConsEnvironment"):
130130
## Copy env variables.
131131
env["ENV"] = os.environ
132132

133+
# This makes `wasm-ld` treat all warnings as errors.
134+
if env["werror"]:
135+
env.Append(LINKFLAGS=["-Wl,--fatal-warnings"])
136+
133137
# LTO
134138

135139
if env["lto"] == "auto": # Enable LTO for production.

0 commit comments

Comments
 (0)