Skip to content

Commit 044c6a1

Browse files
committed
fix
1 parent aec8319 commit 044c6a1

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

tools/shared.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -2468,14 +2468,15 @@ def add_to_path(dirname):
24682468

24692469
# closure compiler will automatically preserve @license blocks, but we
24702470
# have an explicit flag for that (EMIT_EMSCRIPTEN_LICENSE), which we
2471-
# don't have a way to tell closure about. remove the comment here, and
2472-
# handle this in the normal place.
2473-
with open(outfile) as f:
2474-
code = f.read()
2475-
if code.startswith(JS.closured_emscripten_license):
2476-
code = code[len(JS.closured_emscripten_license):]
2477-
with open(outfile, 'w') as f:
2478-
f.write(code)
2471+
# don't have a way to tell closure about. remove the comment here if we
2472+
# don't want it.
2473+
if not(Settings.EMIT_EMSCRIPTEN_LICENSE and Settings.WASM_BACKEND):
2474+
with open(outfile) as f:
2475+
code = f.read()
2476+
if code.startswith(JS.closured_emscripten_license):
2477+
code = code[len(JS.closured_emscripten_license):]
2478+
with open(outfile, 'w') as f:
2479+
f.write(code)
24792480

24802481
return outfile
24812482

0 commit comments

Comments
 (0)