diff --git a/.github/workflows/web_builds.yml b/.github/workflows/web_builds.yml index 257894d3f9..dba7896b4c 100644 --- a/.github/workflows/web_builds.yml +++ b/.github/workflows/web_builds.yml @@ -20,16 +20,16 @@ jobs: fail-fast: false matrix: include: - - name: Template w/ threads (target=template_release, threads=yes) + - name: Template w/ threads, 64-bit (target=template_release, threads=yes, arch=wasm64) cache-name: web-template target: template_release - scons-flags: threads=yes + scons-flags: threads=yes arch=wasm64 artifact: true - - name: Template w/o threads (target=template_release, threads=no) + - name: Template w/o threads, 32-bit (target=template_release, threads=no, arch=wasm32) cache-name: web-nothreads-template target: template_release - scons-flags: threads=no + scons-flags: threads=no arch=wasm32 artifact: true steps: diff --git a/platform/web/detect.py b/platform/web/detect.py index d8211068b2..68608e17ef 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -122,7 +122,7 @@ def configure(env: "SConsEnvironment"): env["EXPORTED_RUNTIME_METHODS"] = [] # Validate arch. - supported_arches = ["wasm32"] + supported_arches = ["wasm32", "wasm64"] validate_arch(env["arch"], get_name(), supported_arches) try: @@ -299,6 +299,8 @@ def configure(env: "SConsEnvironment"): env.extra_suffix = ".dlink" + env.extra_suffix env.Append(LINKFLAGS=["-sWASM_BIGINT"]) + env.Append(CCFLAGS=[f"-sMEMORY64={0 if env['arch'] == 'wasm32' else 1}"]) + env.Append(LINKFLAGS=[f"-sMEMORY64={0 if env['arch'] == 'wasm32' else 1}"]) # Run the main application in a web worker if env["proxy_to_pthread"]: diff --git a/platform_methods.py b/platform_methods.py index af9134ae8b..06eec9ab41 100644 --- a/platform_methods.py +++ b/platform_methods.py @@ -17,7 +17,7 @@ compatibility_platform_aliases = { } # CPU architecture options. -architectures = ["x86_32", "x86_64", "arm32", "arm64", "rv64", "ppc64", "wasm32", "loongarch64"] +architectures = ["x86_32", "x86_64", "arm32", "arm64", "rv64", "ppc64", "wasm32", "wasm64", "loongarch64"] architecture_aliases = { "x86": "x86_32", "x64": "x86_64",