[PATCH] D104764: [CMake] Don't LTO optimize targets on Darwin either

Azharuddin Mohammed via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 00:10:14 PDT 2021


azharudd added a comment.

In D104764#2895638 <https://reviews.llvm.org/D104764#2895638>, @phosek wrote:

> In D104764#2895621 <https://reviews.llvm.org/D104764#2895621>, @azharudd wrote:
>
>> Should this apply to Darwin even when not using LLD?
>>
>> I'm seeing an error which tracks down to this change. It works fine without the `-mllvm,-O0` link flags.
>>
>>   FAILED: bin/llvm-tblgen 
>>   [...snip...]
>>   Remaining virtual register operands
>>   UNREACHABLE executed at .../llvm-project/llvm/lib/CodeGen/MachineRegisterInfo.cpp:209!
>>   clang-13: error: unable to execute command: Abort trap: 6
>>   clang-13: error: linker command failed due to signal (use -v to see invocation)
>>
>> https://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/4221/consoleFull
>
> It should, ld64 supports passing flags to libLTO via the `-mllvm` flag. We have been using this on our macOS bots for a few weeks and haven't run into any issues (they are using using ld64, not lld).

@phosek, the config where I'm seeing this is a two stage bootstrap build. Could you try building again with the just built clang and see if it still works for you? I seem to be able to reliably reproduce the error locally.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104764



More information about the llvm-commits mailing list