[PATCH] D35648: [CMake] Add more runtime configurations.

Leo Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 23:25:37 PDT 2017


aoli added inline comments.


================
Comment at: runtimes/CMakeLists.txt:429
+      add_dependencies(clang-bootstrap-deps runtimes)
       add_dependencies(clang-bootstrap-deps runtimes-configure)
     endif()
----------------
aoli wrote:
> beanz wrote:
> > aoli wrote:
> > > beanz wrote:
> > > > srhines wrote:
> > > > > Is this dependency needed now? I assume runtimes depends on runtimes-configure, but maybe I am mistaken.
> > > > Uh... This part of the patch should be done differently.
> > > > 
> > > > This hack is in place because of how clang finds c++ headers relative to itself, so we need to configure the runtimes directory (which copies the c++ headers) otherwise we can't actually build anything with the stage1 compiler.
> > > > 
> > > > Making clang-bootstrap-deps depend on the runtimes target should be done separately only if the next stage build is intending to link against runtime libraries from the stage1 build, and even then I'm not sure we should be depending on the runtimes target, I'd much rather the dependency was setup on the top-level target for the runtime library (i.e. libcxx, libunwind, compiler-rt...).
> > > I agree. 
> > > 
> > > Shall we bring some new variables like `LLVM_USE_STAGE1_LIBCXX`, `LLVM_USE_STAGE1_LIBUNWIND` ...?
> > Configuring the bootstrap builds is currently done in Clang, not LLVM. We probably want an option like `BOOTSTRAP_USE_<libname>` which we can interpret in `<clang>/CMakeLists.txt` where we handle the other bootstrap options.
> > 
> > We don't want the option to name a specific stage because we do support many-layered bootstraps.
> I reverted this change and I'll bring a new patch to add bootstrap options.
By using `BOOTSTRAP_USE_<libname>`, it will also pass `USE_<libname>` as variables to stage2 because the variables start with `BOOTSTRAP_`. To avoid passing unused variables, shall we use  `CLANG_BOOTSTRAP_USE_<libname>` or something better?


https://reviews.llvm.org/D35648





More information about the llvm-commits mailing list