Skip to content
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

build(win32): Fix SafeSEH build on Win32 #64

Merged
merged 1 commit into from
Oct 14, 2019
Merged

Conversation

jan-auer
Copy link
Member

When building with enabled Safe SEH on Windows x86, linking failed with the following error:

error LNK2026: module unsafe for SAFESEH image

This is due to a missing compile flag to cl when building MASM modules for crashpad_util. Crashpad sets this by adding /safeseh to ASM options. In premake, this is possible by setting exceptionhandling 'SEH' on ASM files for the Win32 platform. It took me a little to find the correct filter, but now it generates this in the VS project XML (which builds fine):

<Masm Include="..\crashpad\build\crashpad\util\misc\capture_context_win.asm">
  <UseSafeExceptionHandlers Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</UseSafeExceptionHandlers>
  <UseSafeExceptionHandlers Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</UseSafeExceptionHandlers>
</Masm>

Fixes #56

@jan-auer jan-auer requested a review from tonyo October 12, 2019 09:24
@jan-auer jan-auer self-assigned this Oct 12, 2019
@jan-auer jan-auer merged commit 1a0997f into master Oct 14, 2019
@jan-auer jan-auer deleted the fix/win32-safeseh branch October 14, 2019 08:17
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.

Can't compile sentry_crashpad 0.1.0 x32 Release
2 participants