Blumenthal, Uri - 0553 - MITLL via llvm-dev
2021-Jul-18 17:13 UTC
[llvm-dev] Clang-12 fails build on MacOS
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>
Thanks for the info, however I don't think we still understand the root cause. Why do we end up with two instances trying to create the symlink to the same location? Per my thinking different targets end up with separate build directories thus this shouldn't happen. And since the different runtime builds are sub-builds your proposed dependency tracking solution wouldn't work.
Blumenthal, Uri - 0553 - MITLL via llvm-dev
2021-Jul-18 18:32 UTC
[llvm-dev] Clang-12 fails build on MacOS
It appears that the proposed workaround had been tested and proven to work. Which is why I'm asking to give it a try. Perhaps doing that would help understanding the root cause too. Regards, Uri> On Jul 18, 2021, at 14:27, Raul Tambre <raul at tambre.ee> wrote: > > Thanks for the info, however I don't think we still understand the root cause. Why do we end up with two instances trying to create the symlink to the same location? > > Per my thinking different targets end up with separate build directories thus this shouldn't happen. And since the different runtime builds are sub-builds your proposed dependency tracking solution wouldn't work.-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5819 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210718/59a80cce/attachment.bin>