[libcxx-commits] [libcxx] 19aec8c - Enforce that libc++ and libc++abi are built in a monorepo layout

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 30 14:58:30 PDT 2020


Author: Louis Dionne
Date: 2020-03-30T17:57:36-04:00
New Revision: 19aec8c90492435b1ff59dacd4307f1bbcf6ab1d

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

LOG: Enforce that libc++ and libc++abi are built in a monorepo layout

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. All consumers of libc++ and libc++abi
should already be doing so through the monorepo, however it is
possible that we catch some stragglers with this patch, in which
case it may need to be reverted temporarily.

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

Added: 
    

Modified: 
    libcxx/CMakeLists.txt
    libcxxabi/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 8bdb24e5fd2a..0aeb07ddbc12 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -1,6 +1,10 @@
 # See https://libcxx.llvm.org/docs/BuildingLibcxx.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
 #===============================================================================

diff  --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index 9b96224774fb..a58789f5bfb7 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/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
 #===============================================================================


        


More information about the libcxx-commits mailing list