This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] [CMake] Handle the RelWithDebInfo configuration similarly to Release
ClosedPublic

Authored by mstorsjo on May 4 2022, 3:00 AM.

Details

Summary

This makes sure to include libunwind log messages in the build if
LIBUNWIND_ENABLE_ASSERTIONS is set (which it is by default), when
building in RelWithDebInfo configurations.

Diff Detail

Event Timeline

mstorsjo created this revision.May 4 2022, 3:00 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 4 2022, 3:00 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
mstorsjo requested review of this revision.May 4 2022, 3:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 3:00 AM
MaskRay accepted this revision.May 4 2022, 9:16 AM

Thanks. It makes sense for RELWITHDEBINFO to match RELEASE.

This revision is now accepted and ready to land.May 4 2022, 9:16 AM
phosek accepted this revision.May 4 2022, 9:29 AM

LGTM

I checked LLVM_ENABLE_ASSERTS, and that one seems to have handled this by inverting the condition, checking for NOT “DEBUG”, I guess that’d be even better?

mstorsjo updated this revision to Diff 427073.May 4 2022, 11:12 AM

Restructured to check NOT STREQUAL "DEBUG" instead of enumerating the release modes, matching a similar check in llvm/cmake/modules/HandleLLVMOptions.cmake. I'll push this later if there's no further comments on it.

MaskRay accepted this revision.May 4 2022, 11:14 AM

Agree this is better and also handles MINSIZEREL

Perhaps ask @ldionne whether libcxxabi/CMakeLists.txt:383 needs a similar change.

This revision was landed with ongoing or failed builds.May 4 2022, 12:55 PM
This revision was automatically updated to reflect the committed changes.