[llvm] d677720 - [llvm/runtimes] Add runtimes as a dependency of clang-bootstrap-deps

Alex Langford via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 16:59:47 PST 2019


Author: Xin-Xin Wang
Date: 2019-12-16T16:58:15-08:00
New Revision: d6777207b4fd4868a4409cc39936156ec3aa3c50

URL: https://github.com/llvm/llvm-project/commit/d6777207b4fd4868a4409cc39936156ec3aa3c50
DIFF: https://github.com/llvm/llvm-project/commit/d6777207b4fd4868a4409cc39936156ec3aa3c50.diff

LOG: [llvm/runtimes] Add runtimes as a dependency of clang-bootstrap-deps

Summary: With the new LLVM_ENABLE_RUNTIMES option introduced in https://reviews.llvm.org/D40233, compiler-rt can now be included as a runtime. Since compiler-rt is needed for PGO, runtimes needs to be included as a dependency of clang-bootstrap-deps when building the stage1 compiler.

Reviewers: beanz, phosek, compnerd, smeenai, plotfi, xiaobai

Reviewed By: phosek

Subscribers: smeenai, beanz, phosek, mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71430

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 1b9c4f0a396d..f29d601d3fcd 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -555,13 +555,16 @@ else() # if this is included from LLVM's CMake
       endforeach()
     endif()
 
-    # TODO: This is a hack needed because the libcxx headers are copied into the
-    # build directory during configuration. Without that step the clang in the
-    # build directory cannot find the C++ headers in certain configurations.
-    # I need to build a mechanism for runtime projects to provide CMake code
-    # that executes at LLVM configuration time to handle this case.
     if(NOT LLVM_BUILD_INSTRUMENTED AND CLANG_ENABLE_BOOTSTRAP)
+      # TODO: This is a hack needed because the libcxx headers are copied into the
+      # build directory during configuration. Without that step the clang in the
+      # build directory cannot find the C++ headers in certain configurations.
+      # I need to build a mechanism for runtime projects to provide CMake code
+      # that executes at LLVM configuration time to handle this case.
       add_dependencies(clang-bootstrap-deps runtimes-configure)
+      # We need to add the runtimes as a dependency because compiler-rt can be
+      # built as part of runtimes and we need the profile runtime for PGO
+      add_dependencies(clang-bootstrap-deps runtimes)
     endif()
 
     if(LLVM_INCLUDE_TESTS)


        


More information about the llvm-commits mailing list