From 739ce0256a914c3824d7bf29363e2bf4a6fe9d19 Mon Sep 17 00:00:00 2001 From: Victor Powell Date: Thu, 19 Sep 2024 12:17:57 -0700 Subject: [PATCH] Allow JS files to be executable --- tools/link.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/link.py b/tools/link.py index 0892b9f15368b..1f14905a2ded0 100644 --- a/tools/link.py +++ b/tools/link.py @@ -774,6 +774,8 @@ def phase_linker_setup(options, state, newargs): else: # Otherwise the wasm file is produced alongside the final target. wasm_target = get_secondary_target(target, '.wasm') + if final_suffix in EXECUTABLE_ENDINGS: + options.executable = True if settings.SAFE_HEAP not in [0, 1, 2]: exit_with_error('emcc: SAFE_HEAP must be 0, 1 or 2')