[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
GitOrigin-RevId: fa1c077b41ae1335332d65399802f2c68e82ca7b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bec0d1f..3727d11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,11 @@
include(HandleCompilerRT)
# Define options.
-option(LIBUNWIND_BUILD_32_BITS "Build 32 bit libunwind" ${LLVM_BUILD_32_BITS})
+option(LIBUNWIND_BUILD_32_BITS "Build 32 bit multilib libunwind. This option is not supported anymore when building the runtimes. Please specify a full triple instead." ${LLVM_BUILD_32_BITS})
+if (LIBUNWIND_BUILD_32_BITS)
+ message(WARNING "LIBUNWIND_BUILD_32_BITS is not supported anymore when building the runtimes, please specify a full triple instead.")
+endif()
+
option(LIBUNWIND_ENABLE_CET "Build libunwind with CET enabled." OFF)
option(LIBUNWIND_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
option(LIBUNWIND_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
@@ -119,15 +123,6 @@
message(FATAL_ERROR "libunwind CET support is not available for MSVC!")
endif()
-# Check that we can build with 32 bits if requested.
-if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)
- if (LIBUNWIND_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(LIBUNWIND_BUILD_32_BITS)
- message(FATAL_ERROR "LIBUNWIND_BUILD_32_BITS=ON is not supported on this platform.")
-endif()
-
option(LIBUNWIND_HIDE_SYMBOLS
"Do not export any symbols from the static library." OFF)
@@ -180,9 +175,6 @@
# Setup Compiler Flags
#===============================================================================
-# Get required flags.
-add_target_flags_if(LIBUNWIND_BUILD_32_BITS "-m32")
-
# Compiler tests may be failing if the compiler implicitly links in libunwind,
# which doesn't exist yet. This gets waived by --unwindlib=none
# later in config-ix below, but the tests for --target etc before that may
diff --git a/docs/BuildingLibunwind.rst b/docs/BuildingLibunwind.rst
index 9b11042..d4e051e 100644
--- a/docs/BuildingLibunwind.rst
+++ b/docs/BuildingLibunwind.rst
@@ -94,12 +94,6 @@
libunwind specific options
--------------------------
-.. option:: LIBUNWIND_BUILD_32_BITS:BOOL
-
- **Default**: Same as LLVM_BUILD_32_BITS
-
- Toggle whether libunwind should be built with -m32.
-
.. option:: LIBUNWIND_ENABLE_ASSERTIONS:BOOL
**Default**: ``ON``
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 932a6e3..7e86d50 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -11,7 +11,6 @@
set(LIBCXX_ENABLE_SHARED ON)
endif()
-pythonize_bool(LIBUNWIND_BUILD_32_BITS)
pythonize_bool(LIBUNWIND_ENABLE_CET)
pythonize_bool(LIBCXX_ENABLE_SHARED)
pythonize_bool(LIBUNWIND_ENABLE_SHARED)
@@ -41,10 +40,6 @@
serialize_lit_param(target_triple "\"${LIBUNWIND_TARGET_TRIPLE}\"")
endif()
-if (LIBUNWIND_BUILD_32_BITS)
- serialize_lit_param(enable_32bit True)
-endif()
-
foreach(param IN LISTS LIBUNWIND_TEST_PARAMS)
string(REGEX REPLACE "(.+)=(.+)" "\\1" name "${param}")
string(REGEX REPLACE "(.+)=(.+)" "\\2" value "${param}")
diff --git a/test/remember_state_leak.pass.sh.s b/test/remember_state_leak.pass.sh.s
index df1512d..f18d176 100644
--- a/test/remember_state_leak.pass.sh.s
+++ b/test/remember_state_leak.pass.sh.s
@@ -2,9 +2,6 @@
# RUN: %{build}
# RUN: %{run}
-// TODO: Investigate this failure
-// XFAIL: 32bits-on-64bits
-
# The following assembly is a translation of this code:
#
# _Unwind_Reason_Code callback(int, _Unwind_Action, long unsigned int,