[libcxx-commits] [PATCH] D76102: Enforce that libc++ and libc++abi are built in a monorepo layout

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 12 15:12:14 PDT 2020


ldionne created this revision.
Herald added subscribers: libcxx-commits, dexonsmith, jkorous, mgorny.
Herald added a reviewer: EricWF.
Herald added projects: libc++, libc++abi.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

We will soon start removing technical debt and sharing code between the
two directories, so this first step is meant to discover potential places
where the libraries are built outside of a monorepo layout. I imagine
this could happen as a remnant of the pre-monorepo setup.

This was discussed on the libcxx-dev mailing list and we got overall
consensus on the direction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76102

Files:
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt


Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -1,5 +1,9 @@
 # See www/CMake.html for instructions on how to build libcxxabi with CMake.
 
+if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libcxx")
+  message(FATAL_ERROR "libc++abi now requires being built in a monorepo layout with libcxx available")
+endif()
+
 #===============================================================================
 # Setup Project
 #===============================================================================
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -1,5 +1,9 @@
 # See www/CMake.html for instructions on how to build libcxx with CMake.
 
+if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libcxxabi")
+  message(FATAL_ERROR "libc++ now requires being built in a monorepo layout with libcxxabi available")
+endif()
+
 #===============================================================================
 # Setup Project
 #===============================================================================


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76102.250067.patch
Type: text/x-patch
Size: 1211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200312/74223fc3/attachment.bin>


More information about the libcxx-commits mailing list