-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added first class citizen emscripten support (new wasm64 architecture + emcc) #18432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be necessary if we are using the emscripten installed in the machines, better remove it
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.
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.js
and introduces new architecturewasm64
.