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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 4 08:46:56 PST 2022


ldionne added a comment.

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.


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