Added first class citizen emscripten support (new wasm64 architecture + emcc)#18432
Merged
Conversation
memsharded
reviewed
Jun 9, 2025
memsharded
left a comment
Member
There was a problem hiding this comment.
Looking very good!
Tests on Windows are failing, as expected, as Emscripten not installed there.
| compiler.version=4.0.10 | ||
| os=Emscripten | ||
|
|
||
| [platform_tool_requires] |
Member
There was a problem hiding this comment.
This shouldn't be necessary if we are using the emscripten installed in the machines, better remove it
memsharded
reviewed
Jun 10, 2025
memsharded
approved these changes
Jun 12, 2025
memsharded
added a commit
that referenced
this pull request
Jun 20, 2025
Changelog: Feature: new linker flags autodetected by conan based on profile architecture Docs: omit In #18432 native `asmjs` architecture support was introduced. To enable `asmjs` code generation the `-sWASM=0` flag needs to be passed to the `emscripten linker`. That flag was added in `architecture_flag` without noticing that those flags were being passed to both compiler and linker across all toolchains. This was causing the compiler to throw warnings as this flag is only understood by the linker: ``` em++: warning: linker setting ignored during compilation: 'WASM' [-Wunused-command-line-argument] ``` Having a compilation warning is not desirable as a compilation with warning as errors will result in a build failure: ``` em++: error: linker setting ignored during compilation: 'WASM' [-Wunused-command-line-argument] [-Werror] ``` This PR aims to address this issue by creating a new `architecture_link_flags` which will return the required flags **only** for the linker based on the profile architecture. This function will be called by several toolchains which will bypass the result to the final linker by setting `LD_FLAGS`. #### Tests The current [`test_emcc`](https://github.com/conan-io/conan/blob/92b606909bd4fe04f5b3ea515130d31a8f0481da/test/functional/toolchains/emscripten/test_emcc.py) test suite already tests this new functionality added.
This was referenced Jun 24, 2025
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog: Feature: Added first class citizen emscripten support (new wasm64 architecture + emcc).
Docs: conan-io/docs#4115
Examples2: conan-io/examples2#184
This PR adds updated support to
wasm(32 bits) andasm.jsand introduces new architecturewasm64.