This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix building for mingw after changes to sigtstp_handler
ClosedPublic

Authored by mstorsjo on Mar 25 2022, 8:48 AM.

Details

Summary

Some signal handlers are set up within an !_MSC_VER condition,
i.e. omitted in MSVC builds but included in mingw builds. Previously
sigtstp_handler was defined in all builds, but since
4bcadd66864bf4af929ac8753a51d7ad408cdef0 / D120320 it's only
defined non platforms other than Windows.

This applies a matching ifdef around the usage of sigtstp_handler.

Alternatively the ifdef condition could be changed from !_MSC_VER
to !_WIN32 - I'm unsure whether the other ones that are hooked up
in mingw builds but not in MSVC builds actually ever make a difference
in mingw builds.

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 25 2022, 8:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2022, 8:48 AM
mstorsjo requested review of this revision.Mar 25 2022, 8:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2022, 8:48 AM

Alternatively the ifdef condition could be changed from !_MSC_VER to !_WIN32 - I'm unsure whether the other ones that are hooked up in mingw builds but not in MSVC builds actually ever make a difference in mingw builds.

On second thought, maybe it'd be best to just go down this route, to reduce unnecessary differences between the MSVC and mingw builds. If the (more officially supported) MSVC build can do without these signals, the mingw build should too.

mstorsjo updated this revision to Diff 418244.Mar 25 2022, 8:56 AM

Changed the existing ifdef around the signals that were omitted in the MSVC build.

labath accepted this revision.Mar 25 2022, 12:48 PM
This revision is now accepted and ready to land.Mar 25 2022, 12:48 PM