[libcxx-commits] [PATCH] D112112: [libunwind] Link with -unwindlib=none
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 20 13:20:24 PDT 2021
mstorsjo added a comment.
In D112112#3076253 <https://reviews.llvm.org/D112112#3076253>, @hvdijk wrote:
> In D112112#3076215 <https://reviews.llvm.org/D112112#3076215>, @mstorsjo wrote:
>
>> Ah, I see. Can you try by adding `-DCMAKE_C_COMPILER_WORKS=TRUE -DCMAKE_CXX_COMPILER_WORKS=TRUE`? That waives this particular failure.
>
> I tried that at first (for both compiler-rt and libunwind -- I don't think we should be using different workarounds for the two),
Hmm. I used to use `CMAKE_C[XX]_COMPILER_WORKS` for compiler-rt, too, but since 8368e4d54c459fe173d76277f17c632478e91add <https://reviews.llvm.org/rG8368e4d54c459fe173d76277f17c632478e91add> / D91334 <https://reviews.llvm.org/D91334>, compiler-rt/lib/builtins does set `CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY` (which works fine there, because it doesn't do any linker testing - as it actually only is building a static library), so I no longer need to set those flags there.
> that breaks in a different way:
>
> CMake Error at cmake/config-ix.cmake:197 (message):
> Please use architecture with 4 or 8 byte pointers.
> Call Stack (most recent call first):
> CMakeLists.txt:251 (include)
That's curious.
If sidestepping this issue a little - if you'd only add those `*_WORKS` flags to libunwind, do things work there too?
When running into this error in compiler-rt, were you pointing cmake at `compiler-rt/lib/builtins` or plain `compiler-rt`? From some quick grepping, it seems like this only would be triggered by the toplevel compiler-rt. In my setups, I first point cmake at `compiler-rt/lib/builtins` and build that, then build libunwind, libcxxabi, libcxx, then after that point it at the root of compiler-rt to build all of it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112112/new/
https://reviews.llvm.org/D112112
More information about the libcxx-commits
mailing list