[PATCH] D45604: Support for multiarch runtimes layout

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 10:49:01 PDT 2018


phosek added a comment.

In https://reviews.llvm.org/D45604#1068915, @rnk wrote:

> The overall goal makes sense to me, but I feel like this patch adds many CMake variables to accomplish it, which are only set from the Fuchsia CMake cache. I feel like it would be simpler to have one CMake flag that clang and the runtime libraries look at to decide if they want to use the old `libclang_rt.$arch.$lib` paths, or the new `clang/$version/$triple/lib/$lib` paths.
>
> In other words, we should aim to make the CMake cache scripts as simple as possible. Most developers (so far as I know) don't use the cache scripts to configure their local builds. They directly invoke LLVM's CMake, usually with a shell script with their favorite options. Ideally, changing the runtime library layout this way would be adding a simple flag to that script, rather than requiring developers to switch to these cache scripts or duplicating the logic of the cache scripts.


It's not necessarily Fuchsia-specific, but it relies on the runtimes build which is currently only used by Fuchsia and Android AFAIK, that build model makes some things easier, e.g. compiler-rt is always built for a single target only (list of targets is configured via cache files). I'm fine changing this to guard the layout used behind a single CMake variable (e.g. `ENABLE_RUNTIME_TARGET_DIR`), but it'll require more changes to compiler-rt build, is that fine with you?


Repository:
  rL LLVM

https://reviews.llvm.org/D45604





More information about the llvm-commits mailing list