Page MenuHomePhabricator

[libunwind] Provide a way to set '_LIBUNWIND_IS_BAREMETAL' through cmake.
ClosedPublic

Authored by abidh on Jul 28 2020, 8:00 AM.

Details

Summary

Libunwind uses _LIBUNWIND_IS_BAREMETAL in a lot of places but there is no cmake variable to set it. This patch adds such a variable. It is quite like what LIBCXXABI_BAREMETAL does in libcxxabi.

Diff Detail

Event Timeline

abidh created this revision.Jul 28 2020, 8:00 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 28 2020, 8:00 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
abidh requested review of this revision.Jul 28 2020, 8:00 AM
compnerd accepted this revision.Jul 28 2020, 8:47 AM

Minor nits, but this seems like a reasonable control to give to the user.

libunwind/CMakeLists.txt
365

LLVM style is to not have the space after the if.

366

Could you use add_compile_definitions instead please?

This revision is now accepted and ready to land.Jul 28 2020, 8:47 AM
abidh marked 2 inline comments as done.Jul 29 2020, 3:28 AM
abidh added inline comments.
libunwind/CMakeLists.txt
365

Done. But I noticed that most if in this file have a space after them.

abidh updated this revision to Diff 281499.Jul 29 2020, 3:32 AM
abidh marked an inline comment as done.

Handled review comments.