[PATCH] D106305: [compiler-rt][CMake] create aarch64 helper asm during configure time

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 08:59:43 PDT 2021


steven_wu added a comment.

In D106305#2889456 <https://reviews.llvm.org/D106305#2889456>, @tambre wrote:

> See this mailing list thread <https://lists.llvm.org/pipermail/llvm-dev/2021-July/151822.html> for the background. Please also link it in the commit description.
>
> Per the description here <https://lists.llvm.org/pipermail/llvm-dev/2021-July/151844.html> it seems that different architectures do get different build directories, so the symlink creation shouldn't conflict. As I noted in the thread, I would prefer to understand the root cause before applying a workaround or a fix.
> Per my current understanding the issue shouldn't be possible and might well be a bug in CMake's Makefile generator since the issue was reported to not occur with Ninja.
>
> If someone could provide me the build directory for the failing build (with the relevant runtimes builds generated) I would be able to understand the issue better.
> Also, what CMake version is the issue encountered with?

Thanks for providing the background. I don't know enough about the makefile generator to know if this is a bug or a limitation. I am on CMake 3.19 and I think the original reporter is on 3.20. You can reproduce the issue running build with Xcode 12+/macOS 11+SDK on macOS (I am not sure how you cross compile for macOS if you are on other platform). I don't think you need to do anything special, just enable clang and compiler-rt in `LLVM_ENABLE_PROJECTS` with makefile generator.

Like I mentioned in the email thread, create_symlink command in both: projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins_arm64_osx.dir/build.make and projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins_arm64e_osx.dir/build.make. I can probably create a dump of makefiles generated from cmake if needed.

The other option is probably just use copy instead of symlink when build for darwin. I don't see copy file will error on race conditions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106305



More information about the llvm-commits mailing list