[libcxx-commits] [PATCH] D137870: [CMake][compiler-rt] Don't load LLVM config in the runtimes build

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Nov 13 00:15:41 PST 2022


mstorsjo added inline comments.


================
Comment at: compiler-rt/CMakeLists.txt:82
 
-  load_llvm_config()
+  if (NOT LLVM_RUNTIMES_BUILD)
+    load_llvm_config()
----------------
phosek wrote:
> mstorsjo wrote:
> > phosek wrote:
> > > mstorsjo wrote:
> > > > Isn’t this condition unnecessary? This is in a block guarded with `if (COMPILER_RT_STANDALONE_BUILD)`, and if that’s true, `LLVM_RUNTIMES_BUILD` won’t be set?
> > > We currently set `COMPILER_RT_STANDALONE_BUILD` in the runtimes build, see https://github.com/llvm/llvm-project/blob/f53fde8e150553c194b3325fe2781775aa40ac3a/runtimes/CMakeLists.txt#L183. I'd like to eventually remove that, but we need to do a bunch of cleanup first.
> > Ah, I see.
> > 
> > Ok, in that case, this is a step in the right direction indeed. And I can see that it'll take a couple patches to untangle it - the compiler-rt cmake files are notoriously complex.
> Yeah, I'd like to improve the runtimes build support in compiler-rt with the eventual goal of deprecating the standalone build the same way we've done for libc++, but that's difficult if we have to make all changes in a way that doesn't break the standalone build. So I'm thinking about taking a different strategy which is to put the integration behind `LLVM_RUNTIMES_BUILD` until we're ready to deprecate the standalone build. It's not the cleanest solution, but hopefully it's just temporary.
Sounds reasonable, as long as there’s a simple way to only build the builtins. IIRC llvm/runtimes builds those in a separate pass before building all other runtimes?

Currently in my bootstraps, I build the builtins in a super-standalone way by pointing cmake at compiler-rt/lib/builtins.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137870



More information about the libcxx-commits mailing list