[libcxx-commits] [PATCH] D112126: [libunwind] Try to add -unwindlib=none while configuring and building libunwind

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 22 15:23:05 PDT 2021


mstorsjo added a comment.

In D112126#3081756 <https://reviews.llvm.org/D112126#3081756>, @hvdijk wrote:

> With this patch (on top of 13.0.0), I am getting a successful build, but the start of the CMake output makes me doubt whether the result is what is intended:
>
>   -- The C compiler identification is Clang 13.0.0
>   -- The CXX compiler identification is Clang 13.0.0
>   -- The ASM compiler identification is Clang
>   -- Found assembler: /usr/bin/clang
>   -- Detecting C compiler ABI info
>   -- Detecting C compiler ABI info - failed
>   -- Detecting C compile features
>   -- Detecting C compile features - done
>   -- Detecting CXX compiler ABI info
>   -- Detecting CXX compiler ABI info - failed
>   -- Detecting CXX compile features
>   -- Detecting CXX compile features - done
>   -- Configuring for standalone build.
>   -- Linker detection: LLD
>   -- Performing Test LIBUNWIND_SUPPORTS_TARGET_EQ_X86_64_UNKNOWN_LINUX_GNU_FLAG
>   -- Performing Test LIBUNWIND_SUPPORTS_TARGET_EQ_X86_64_UNKNOWN_LINUX_GNU_FLAG - Failed
>   -- Looking for fopen in c
>   -- Looking for fopen in c - not found
>   -- Performing Test LIBUNWIND_SUPPORTS_UNWINDLIB_NONE_FLAG
>   -- Performing Test LIBUNWIND_SUPPORTS_UNWINDLIB_NONE_FLAG - Success
>   [...]
>
> Note that tests were run *before* `-unwindlib=none` got added, which return incorrect results. Is it possible to check for `-unwindlib=none` as the very first thing, even before ABI detection, or does CMake not support that?

I don’t think it supports that, unfortunately… FWIW, I’ve run builds for a couple years now with that configuration, and haven’t run into any issue due to that so far. Also, if you have a look at llvm-project/llvm/runtimes/CMakeLists.txt, it also sets `-DCMAKE_C_COMPILER_WORKS=ON` in a couple of places, for the same reason.

It should be possible to move this before the `LIBUNWIND_SUPPORTS_TARGET_EQ_X86_64_UNKNOWN_LINUX_GNU_FLAG` check though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112126



More information about the libcxx-commits mailing list