[PATCH] D48700: [CMake] Make bootstrap and compiler-rt depend on cxx-headers.

Ahmed Bougacha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 11:40:12 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL335898: [CMake] Make bootstrap and compiler-rt depend on cxx-headers. (authored by ab, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D48700?vs=153248&id=153362#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D48700

Files:
  cfe/trunk/CMakeLists.txt
  cfe/trunk/runtime/CMakeLists.txt


Index: cfe/trunk/runtime/CMakeLists.txt
===================================================================
--- cfe/trunk/runtime/CMakeLists.txt
+++ cfe/trunk/runtime/CMakeLists.txt
@@ -58,8 +58,12 @@
     endif()
   endforeach()
 
+  if(TARGET cxx-headers)
+    set(COMPILER_RT_LIBCXX_DEPENDENCY "cxx-headers")
+  endif()
+
   ExternalProject_Add(compiler-rt
-    DEPENDS llvm-config clang
+    DEPENDS llvm-config clang ${COMPILER_RT_LIBCXX_DEPENDENCY}
     PREFIX ${COMPILER_RT_PREFIX}
     SOURCE_DIR ${COMPILER_RT_SRC_ROOT}
     STAMP_DIR ${STAMP_DIR}
Index: cfe/trunk/CMakeLists.txt
===================================================================
--- cfe/trunk/CMakeLists.txt
+++ cfe/trunk/CMakeLists.txt
@@ -621,10 +621,15 @@
     LLVM_ENABLE_PROJECTS
     LLVM_ENABLE_RUNTIMES)
 
-  # We don't need to depend on compiler-rt if we're building instrumented
+  # We don't need to depend on compiler-rt/libcxx if we're building instrumented
   # because the next stage will use the same compiler used to build this stage.
-  if(TARGET compiler-rt AND NOT LLVM_BUILD_INSTRUMENTED)
-    add_dependencies(clang-bootstrap-deps compiler-rt)
+  if(NOT LLVM_BUILD_INSTRUMENTED)
+    if(TARGET compiler-rt)
+      add_dependencies(clang-bootstrap-deps compiler-rt)
+    endif()
+    if(TARGET cxx-headers)
+      add_dependencies(clang-bootstrap-deps cxx-headers)
+    endif()
   endif()
 
   set(C_COMPILER "clang")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48700.153362.patch
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180628/6fcfc0c3/attachment.bin>


More information about the cfe-commits mailing list