Summary
Clean up deprecated and incorrect Emscripten build flags in tools/makem.js and bump the WebARKitLib submodule
Environment
- Product/Service: FeatureSET-Display — Emscripten build system
- File:
tools/makem.js
Problem Description
Several issues in the Emscripten build configuration:
TOTAL_MEMORY is deprecated: The current flag should be INITIAL_MEMORY. Additionally, the comment says 64MB but the actual value is 256MB — comment and value disagree.
arguments shadowing: var arguments = process.argv shadows the reserved JS arguments keyword — replace with const argv = process.argv.slice(2) and for…of.
- No wasm debug target:
DEBUG_FLAGS currently only apply to the asm.js debug build, which is being removed (see issue 2d). A dedicated wasm debug target with DEBUG_FLAGS is needed.
- Stale
WebARKitLib submodule: Currently pinned ~4 years back; should be bumped to latest stable.
Expected Behavior
INITIAL_MEMORY is used instead of TOTAL_MEMORY; comment and value agree.
- No
arguments shadowing in tools/makem.js.
- A dedicated wasm debug build target exists with
DEBUG_FLAGS applied.
WebARKitLib submodule is on a recent, tested commit.
Actual Behavior
- Deprecated
TOTAL_MEMORY flag used; comment/value mismatch.
var arguments = process.argv silently shadows reserved identifier.
- Debug flags only apply to the asm.js build that is being deleted.
- Submodule is 4 years stale.
Tasks
Impact
Medium — TOTAL_MEMORY is silently accepted by current Emscripten but may break in future versions. Stale submodule may carry bugs fixed upstream.
Additional Context
This issue is the companion to 3a (JS toolchain update). Both should land together for a clean build-system baseline before adding tests (3c) and CI (3d). The arguments shadow is a correctness bug in Node.js strict mode.
Summary
Clean up deprecated and incorrect Emscripten build flags in
tools/makem.jsand bump theWebARKitLibsubmoduleEnvironment
tools/makem.jsProblem Description
Several issues in the Emscripten build configuration:
TOTAL_MEMORYis deprecated: The current flag should beINITIAL_MEMORY. Additionally, the comment says64MBbut the actual value is256MB— comment and value disagree.argumentsshadowing:var arguments = process.argvshadows the reserved JSargumentskeyword — replace withconst argv = process.argv.slice(2)andfor…of.DEBUG_FLAGScurrently only apply to the asm.js debug build, which is being removed (see issue 2d). A dedicated wasm debug target withDEBUG_FLAGSis needed.WebARKitLibsubmodule: Currently pinned ~4 years back; should be bumped to latest stable.Expected Behavior
INITIAL_MEMORYis used instead ofTOTAL_MEMORY; comment and value agree.argumentsshadowing intools/makem.js.DEBUG_FLAGSapplied.WebARKitLibsubmodule is on a recent, tested commit.Actual Behavior
TOTAL_MEMORYflag used; comment/value mismatch.var arguments = process.argvsilently shadows reserved identifier.Tasks
TOTAL_MEMORYwithINITIAL_MEMORY; align comment and value (64MBvs256MB— decide which is correct)var arguments = process.argvwithconst argv = process.argv.slice(2)and update all referencesDEBUG_FLAGSapplied (replacing the asm.js debug build being dropped in 2d)WebARKitLibsubmodule to a recent tested commit; update.gitmodulesand test the buildImpact
Medium —
TOTAL_MEMORYis silently accepted by current Emscripten but may break in future versions. Stale submodule may carry bugs fixed upstream.Additional Context
This issue is the companion to 3a (JS toolchain update). Both should land together for a clean build-system baseline before adding tests (3c) and CI (3d). The
argumentsshadow is a correctness bug in Node.js strict mode.