Added architecture linker specific flags to toolchains#18498
Merged
Conversation
perseoGI
force-pushed
the
pgi/fix/asmjs-link-flags
branch
from
June 19, 2025 14:33
92b6069 to
757ccaf
Compare
czoido
reviewed
Jun 20, 2025
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
memsharded
reviewed
Jun 20, 2025
memsharded
left a comment
Member
There was a problem hiding this comment.
Just a minor issue in the CMake integration.
It will be necessary to add some tests (can be integration, no need to be functional)
memsharded
approved these changes
Jun 20, 2025
czoido
approved these changes
Jun 20, 2025
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: New linker flags autodetected by conan based on profile architecture.
Docs: omit
In #18432 native
asmjsarchitecture support was introduced.To enable
asmjscode generation the-sWASM=0flag needs to be passed to theemscripten linker.That flag was added in
architecture_flagwithout 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:
Having a compilation warning is not desirable as a compilation with warning as errors will result in a build failure:
This PR aims to address this issue by creating a new
architecture_link_flagswhich 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_emcctest suite already tests this new functionality added.