diff --git a/conan_config/profiles/emsdk/.base b/conan_config/profiles/emsdk/.base index 3a8586e..81ce81f 100644 --- a/conan_config/profiles/emsdk/.base +++ b/conan_config/profiles/emsdk/.base @@ -5,12 +5,12 @@ compiler.cppstd=17 compiler.libcxx=libc++ # Choose between both types of multithreading support (or none) # compiler.threads= -compiler.version=5.0.3 +compiler.version=6.0.6 os=Emscripten [tool_requires] ninja/[*] -emsdk/5.0.3 +emsdk/6.0.6 [conf] tools.build:exelinkflags+=['-sALLOW_MEMORY_GROWTH=1'] diff --git a/conan_config/profiles/emsdk/README.md b/conan_config/profiles/emsdk/README.md index 4e9f053..6a27724 100644 --- a/conan_config/profiles/emsdk/README.md +++ b/conan_config/profiles/emsdk/README.md @@ -89,14 +89,39 @@ $ conan build -pr emsdk/wasm32 ### ⚠️ WASM64 caveats: -The latest `node` version `emsdk/5.0.3` installs is the `22.16.0`, which can not run directly wasm64 binaries. -Also, it is not valid to compile wasm64 with `-sMIN_NODE_VERSION=221600`, see following error: +**Conan 2.31.0 or newer is recommended for `wasm64` with `emsdk/6.x`.** Emscripten +6.0.0 added the standard `-m64` flag as an alias for the legacy `-sMEMORY64` +setting, and 6.0.1 deprecated `-sMEMORY64`; Conan learned to prefer `-m64` for +`compiler.version >= 6.0.0` in +[conan-io/conan#20152](https://github.com/conan-io/conan/pull/20152), first +released in 2.31.0. Older Conan still builds — the emitted flag is deprecated, +not removed — but every `wasm64` compile and link reports: + +``` +em++: warning: MEMORY64 is deprecated (prefer the standard -m64 or --target=wasm64 flags). [-Wdeprecated] +``` + +The recipe's `required_conan_version` is deliberately **not** raised for this: it +is shared with `emsdk/5.0.3`, where `-sMEMORY64` remains the correct flag, and +`wasm32` is unaffected on every version. This is a recommendation for one +architecture on one SDK series, not a floor for the package. + +The `node` bundled with the SDK is what decides whether a `wasm64` binary can be +run at all, and it needs `node/23` or newer — `-sMIN_NODE_VERSION` below 230000 +is rejected outright: ``` em++: warning: MIN_NODE_VERSION=221600 is not compatible with MEMORY64 (230000 or above required) [-Wcompatibility] ``` -Thus, to be able to run an `wasm64` binary you will need to download at least `node/23` manually in your system. +This differs by SDK series: + +| SDK | bundled `node` | runs `wasm64` directly | +|---|---|---| +| `emsdk/5.0.3` | 22.16.0 | no — install `node/23+` separately | +| `emsdk/6.0.6` | 24.19.0 | yes | + +So the manual `node` step is only needed on the 5.x series. ### 🧠 Dynamic Memory Allocation diff --git a/conan_config/profiles/emsdk/wasm64 b/conan_config/profiles/emsdk/wasm64 index 79923c3..853caed 100644 --- a/conan_config/profiles/emsdk/wasm64 +++ b/conan_config/profiles/emsdk/wasm64 @@ -9,4 +9,5 @@ arch=wasm64 tools.build:exelinkflags+=['-sMAXIMUM_MEMORY=16GB', '-sINITIAL_MEMORY=16GB', '-sASSERTIONS'] tools.build:sharedlinkflags+=['-sMAXIMUM_MEMORY=16GB', '-sINITIAL_MEMORY=16GB', '-sASSERTIONS'] -# Node version from emsdk/5.0.3 can not run a wasm64 binary. See more details in README +# emsdk/6.0.6 bundles node 24.19.0, which runs wasm64 binaries directly. The +# 5.x series bundles node 22.16.0, which does not. See more details in README diff --git a/recipes/emsdk/all/conandata.yml b/recipes/emsdk/all/conandata.yml index 38ff52a..486f6ee 100644 --- a/recipes/emsdk/all/conandata.yml +++ b/recipes/emsdk/all/conandata.yml @@ -2,3 +2,6 @@ sources: "5.0.3": url: "https://github.com/emscripten-core/emsdk/archive/5.0.3.tar.gz" sha256: "9a44a58bca0a3ea594ea7340d9a726cb58c772144dd37406d1c4e921823a75eb" + "6.0.6": + url: "https://github.com/emscripten-core/emsdk/archive/6.0.6.tar.gz" + sha256: "ce6a639f150493bb827a809ff20bcf727dffba2cfb28b019e14d59a6b7ead26e" diff --git a/recipes/emsdk/config.yml b/recipes/emsdk/config.yml index 1556617..218c16b 100644 --- a/recipes/emsdk/config.yml +++ b/recipes/emsdk/config.yml @@ -1,3 +1,5 @@ versions: "5.0.3": folder: all + "6.0.6": + folder: all