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

Leo Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 16:45:31 PDT 2017


aoli updated this revision to Diff 108551.
aoli added a comment.

Remove dependency. Update comments.


https://reviews.llvm.org/D35648

Files:
  runtimes/CMakeLists.txt


Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -24,6 +24,7 @@
   endfunction()
 
   cmake_minimum_required(VERSION 3.4.3)
+  project(Runtimes C CXX ASM)
 
   # Add the root project's CMake modules, and the LLVM build's modules to the
   # CMake module path.
@@ -84,6 +85,10 @@
   include(AddLLVM)
   include(HandleLLVMOptions)
 
+  if (ANDROID)
+    remove_definitions(-D_FILE_OFFSET_BITS=64)
+  endif()
+
   set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS})
   set(CMAKE_REQUIRED_LIBRARIES ${SAFE_CMAKE_REQUIRED_LIBRARIES})
 
@@ -414,13 +419,14 @@
       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.
+    # TODO: This is a hack needed because runtimes should be built before
+    # building stage-2 LLVM if stage-2 LLVM is built against stage-1 runtimes.
+    # Without that step the clang in the build directory cannot find the
+    # C++ headers and runtime libraries 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)
-      add_dependencies(clang-bootstrap-deps runtimes-configure)
+      add_dependencies(clang-bootstrap-deps runtimes)
     endif()
 
     if(LLVM_INCLUDE_TESTS)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35648.108551.patch
Type: text/x-patch
Size: 1611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170727/39cf3e64/attachment.bin>


More information about the llvm-commits mailing list