[runtimes] Remove support for GCC-style 32 bit multilib builds This patch removes the ability to build the runtimes in the 32 bit multilib configuration, i.e. using -m32. Instead of doing this, one should cross-compile the runtimes for the appropriate target triple, like we do for all other triples. As it stands, -m32 has several issues, which all seem to be related to the fact that it's not well supported by the operating systems that libc++ support. The simplest path towards fixing this is to remove support for the configuration, which is also the best course of action if there is little interest for keeping that configuration. If there is a desire to keep this configuration around, we'll need to do some work to figure out the underlying issues and fix them. Differential Revision: https://reviews.llvm.org/D114473
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 5ab8a30..9670d93 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt
@@ -261,7 +261,10 @@ option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF) # Target options -------------------------------------------------------------- -option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS}) +option(LIBCXX_BUILD_32_BITS "Build 32 bit multilib libc++. This option is not supported anymore when building the runtimes. Please specify a full triple instead." ${LLVM_BUILD_32_BITS}) +if (LIBCXX_BUILD_32_BITS) + message(WARNING "LIBCXX_BUILD_32_BITS is not supported anymore when building the runtimes, please specify a full triple instead.") +endif() if(CMAKE_CXX_COMPILER_TARGET) set(LIBCXX_DEFAULT_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}") @@ -373,16 +376,6 @@ message(FATAL_ERROR "LLVM_USE_SANITIZER cannot be used with LIBCXX_GENERATE_COVERAGE") endif() -# Set LIBCXX_BUILD_32_BITS to (LIBCXX_BUILD_32_BITS OR LLVM_BUILD_32_BITS) -# and check that we can build with 32 bits if requested. -if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32) - if (LIBCXX_BUILD_32_BITS AND NOT LLVM_BUILD_32_BITS) # Don't duplicate the output from LLVM - message(STATUS "Building 32 bits executables and libraries.") - endif() -elseif(LIBCXX_BUILD_32_BITS) - message(FATAL_ERROR "LIBCXX_BUILD_32_BITS=ON is not supported on this platform.") -endif() - # Warn users that LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option. if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY) message(WARNING "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option") @@ -481,7 +474,6 @@ # These flags get added to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS so that # 'config-ix' use them during feature checks. It also adds them to both # 'LIBCXX_COMPILE_FLAGS' and 'LIBCXX_LINK_FLAGS' -add_target_flags_if(LIBCXX_BUILD_32_BITS "-m32") if(LIBCXX_TARGET_TRIPLE) add_target_flags_if_supported("--target=${LIBCXX_TARGET_TRIPLE}") endif()