Merge pull request #102378 from Repiteo/scons/wasm64
SCons: Enable `wasm64` support on web builds
This commit is contained in:
commit
a6aa38ff89
3 changed files with 8 additions and 6 deletions
8
.github/workflows/web_builds.yml
vendored
8
.github/workflows/web_builds.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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"]:
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue