fix(mingw): fall back on JWASM if no ASM_MASM was specified#133
Merged
supervacuus merged 1 commit intogetsentryfrom Sep 9, 2025
Merged
fix(mingw): fall back on JWASM if no ASM_MASM was specified#133supervacuus merged 1 commit intogetsentryfrom
supervacuus merged 1 commit intogetsentryfrom
Conversation
Collaborator
Author
|
@past-due, again, just so you know. This was the reason why this was picked up, but not reflected during the config phase. |
JoshuaMoelans
approved these changes
Sep 9, 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.
as experienced here: getsentry/sentry-native#1360
Seemingly, the initial contribution for
mingwalways searched unconditionally forjwasmto define it as theCMAKE_ASM_MASM_COMPILERformingw.This is no problem as long as
find_programdoesn't findjwasmand no one explicitly specifiesCMAKE_ASM_MASM_COMPILER. But in the Native SDK CI, a change in the GHA runner image revealed ajwasmon thePATHthrough the Strawberry Perl installation. The mingw build picked up thejwasminstallation and overwrote the already definedCMAKE_ASM_MASM_COMPILER, but keeping its flags, which are incompatible and failed the build.The biggest issue is that the CMake configuration phase in no way reveals this change (it appears as if the build proceeds with the explicitly defined assembler
llvm-ml). Still, the code modified in this PR changes the assembler nonetheless.This PR fixes the behavior and checks whether the
CMAKE_ASM_MASM_COMPILERhas already been defined. If it hasn't, it checks for and sets up jwasm; otherwise, it respects the explicit choice.