[PATCH] D74107: [CMake] Use llvm-ar etal for external project build on Darwin

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 13:58:00 PST 2020


phosek added a comment.

In D74107#1862361 <https://reviews.llvm.org/D74107#1862361>, @smeenai wrote:

> In D74107#1862274 <https://reviews.llvm.org/D74107#1862274>, @phosek wrote:
>
> > In D74107#1862126 <https://reviews.llvm.org/D74107#1862126>, @smeenai wrote:
> >
> > > I've never really understood this block, since the `APPLE` and `WIN32/MSVC` conditionals here will reflect the host you're building on and not your actual runtimes target, but this change itself looks fine.
> >
> >
> > They're affected by `CMAKE_SYSTEM_NAME` which is usually set for the runtimes build so it's not necessarily the host. I'm still not sure whether this condition is desirable though since most of these tools either support `APPLE` or `WIN32` platforms, or CMake will just ignore them and use the appropriate tool for the given platform. This code predates runtimes build and my changes so I don't know what the motivation behind that condition was.
>
>
> Right, but the relevant calls to `llvm_ExternalProject_Add` from inside `llvm/runtimes/CMakeLists.txt` all happen when it's being included from LLVM's CMake (i.e. it's //not// the configure for the actual runtimes build), so at that point `CMAKE_SYSTEM_NAME` will just reflect the host, right?


Good point, I've changed the code to instead grep for `CMAKE_SYSTEM_NAME` in the arguments passed to the external project.


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

https://reviews.llvm.org/D74107





More information about the llvm-commits mailing list