[libcxx-commits] [PATCH] D112155: [runtimes] Remove FOO_TARGET_TRIPLE, FOO_SYSROOT and FOO_GCC_TOOLCHAIN

Simon Moll via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 16 09:34:30 PDT 2022


simoll added a comment.

In D112155#3360144 <https://reviews.llvm.org/D112155#3360144>, @ldionne wrote:

> In D112155#3353869 <https://reviews.llvm.org/D112155#3353869>, @simoll wrote:
>
>> Remark: Targets need to specify `CMAKE_ASM_COMPILER_TARGET` or `UnwindRegistersRestore|Save.S` will be assembled for the default target, not the `CMAKE_C|CXX_COMPILER_TARGET`.
>> This caused the libunwind miscompile for the clang-ve-ninja bot: https://lab.llvm.org/buildbot/#/builders/91/builds/4728
>
> Damn, that is tricky. Thanks for the heads up. Do you think we should set `CMAKE_ASM_COMPILER_TARGET` to `CMAKE_CXX_COMPILER_TARGET`? [..]
> Or perhaps we could do something like:
>
>   if (NOT CMAKE_ASM_COMPILER_TARGET STREQUAL CMAKE_CXX_COMPILER_TARGET)
>     message(FATAL_ERROR "I'm sure this is an oversight!")
>   endif()
>   
>   if (NOT CMAKE_C_COMPILER_TARGET STREQUAL CMAKE_CXX_COMPILER_TARGET)
>     message(FATAL_ERROR "I'm sure this is an oversight!")
>   endif()
>
> Anything to either avoid the miscompile would be better than the status quo, which is kind of a trap.

Do we really know that the ASM target is always the same as the C|CXX target?
+1 for emitting a warning at least. `FATAL_ERROR` if we know for sure that these are always the same.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112155



More information about the libcxx-commits mailing list