Skip to content

fix(mingw): fall back on JWASM if no ASM_MASM was specified#133

Merged
supervacuus merged 1 commit intogetsentryfrom
fix/conditionally_fallback_on_jwasm
Sep 9, 2025
Merged

fix(mingw): fall back on JWASM if no ASM_MASM was specified#133
supervacuus merged 1 commit intogetsentryfrom
fix/conditionally_fallback_on_jwasm

Conversation

@supervacuus
Copy link
Copy Markdown
Collaborator

as experienced here: getsentry/sentry-native#1360

Seemingly, the initial contribution for mingw always searched unconditionally for jwasm to define it as the CMAKE_ASM_MASM_COMPILER for mingw.

This is no problem as long as find_program doesn't find jwasm and no one explicitly specifies CMAKE_ASM_MASM_COMPILER. But in the Native SDK CI, a change in the GHA runner image revealed a jwasm on the PATH through the Strawberry Perl installation. The mingw build picked up the jwasm installation and overwrote the already defined CMAKE_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_COMPILER has already been defined. If it hasn't, it checks for and sets up jwasm; otherwise, it respects the explicit choice.

@supervacuus
Copy link
Copy Markdown
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.

@supervacuus supervacuus merged commit aa6419a into getsentry Sep 9, 2025
17 checks passed
@supervacuus supervacuus deleted the fix/conditionally_fallback_on_jwasm branch September 9, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants