[llvm-dev] Clang-12 fails build on MacOS

Blumenthal, Uri - 0553 - MITLL via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 18 10:13:42 PDT 2021


On 7/17/21, 09:11, "Raul Tambre" <raul at tambre.ee> wrote:

 

>    How does the build end up with two commands symlinking to the same location?

>    Different targets through `LLVM_RUNTIME_TARGETS` should end up with separate 

>    build directories. arm64 and arm64e are different targets, right?

> 

>    Creating the symlinks during CMake configuration should be possible as an 

>    alternative.

 

Ken researched this problem, discovered its cause and suggested a workaround:

 

It appears that when running a custom_command, cmake does not use dependency tracking and collisions can happen.

 

"Do not list the output in more than one independent target that may build in parallel or the two instances of the rule may conflict (instead use the add_custom_target() command to drive the command and make the other targets depend on that one)."

 

​https://cmake.org/cmake/help/v3.19/command/add_custom_command.html 

 

The workaround is to add_custom_target a dependency on the output of the custom command.

 

​https://gist.github.com/socantre/7ee63133a0a3a08f3990 

 

It would be great if LLVM maintainers incorporated this workaround, or, at the very least, gave it a try.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210718/4da9fa2e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210718/4da9fa2e/attachment.bin>


More information about the llvm-dev mailing list