[libcxx-commits] [PATCH] D70815: Enable `-funwind-tables` flag when building libunwind

Sergej Jaskiewicz via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 28 05:47:28 PST 2019


broadwaylamb added inline comments.


================
Comment at: libunwind/CMakeLists.txt:311
+
+if (LIBUNWIND_USES_ARM_EHABI AND NOT LIBUNWIND_SUPPORTS_FUNWIND_TABLES_FLAG)
+  message(FATAL_ERROR "The -funwind-tables flag must be supported "
----------------
peter.smith wrote:
> Assuming we can't set CMAKE_TRY_COMPILE_TARGET_TYPE is to do something like:
> ```
> if (LIBUNWIND_USES_ARM_EHABI)
>   // unconditionally add -funwind-tables
> ```
> Anyone trying to compile libunwind without a compiler that supports -funwind-tables gets an error message at build rather than configure time, but is there anyone that wouldn't use a form of Clang or GCC?
My opinion is that we want to fail as early as possible. Also, we can show a dedicated error message if we're failing at configure time, rather than leaving the user on their own with the obscure 'unsupported flag' message (why do I need this flag, the user may ask then).

I too would like to avoid the `CMAKE_TRY_COMPILE_TARGET_TYPE` dance, but I'd like to hear more opinions on this from the people that understand things better than me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70815/new/

https://reviews.llvm.org/D70815





More information about the libcxx-commits mailing list