aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorAaron Siddhartha Mondal <aaron@tracemachina.com>2024-05-31 01:29:00 +0200
committerGitHub <noreply@github.com>2024-05-31 01:29:00 +0200
commit852aaf54071ad072335dcac57f544d4da34c875a (patch)
tree336d6d36f934c387a0384b5fe7bcf68104085c09 /compiler-rt
parentd4ff9615a1531f4a466b7d1fb0f175e3ae489289 (diff)
downloadllvm-852aaf54071ad072335dcac57f544d4da34c875a.zip
llvm-852aaf54071ad072335dcac57f544d4da34c875a.tar.gz
llvm-852aaf54071ad072335dcac57f544d4da34c875a.tar.bz2
Reapply "[Support] Remove terminfo dependency (#92865)" (#93889)
This reverts commit fe82a3da36196157c0caa1ef2505186782f750d1. This broke LLDB on MacOS due to a missing symbol during linking. The fix has been applied in c6c08eee37bada190bd1aa4593c88a5e2c8cdaac. Original commit message: The terminfo dependency introduces a significant nonhermeticity into the build. It doesn't respect `--no-undefined-version` meaning that it's not a dependency that can be built with Clang 17+. This forces maintainers of source-based distributions to implement patches or ignore linker errors. Remove it to reduce the closure size and improve portability of LLVM-based tools. Users can still use command line arguments to toggle color support expliticly. Fixes #75490 Closes #53294 #23355
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/cmake/config-ix.cmake15
-rwxr-xr-xcompiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh1
-rw-r--r--compiler-rt/lib/xray/tests/CMakeLists.txt5
3 files changed, 0 insertions, 21 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 42edbe1..bddaa37 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -182,21 +182,6 @@ check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
check_library_exists(execinfo backtrace "" COMPILER_RT_HAS_LIBEXECINFO)
-# Look for terminfo library, used in unittests that depend on LLVMSupport.
-if(LLVM_ENABLE_TERMINFO STREQUAL FORCE_ON)
- set(MAYBE_REQUIRED REQUIRED)
-else()
- set(MAYBE_REQUIRED)
-endif()
-if(LLVM_ENABLE_TERMINFO)
- find_library(COMPILER_RT_TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED})
-endif()
-if(COMPILER_RT_TERMINFO_LIB)
- set(LLVM_ENABLE_TERMINFO 1)
-else()
- set(LLVM_ENABLE_TERMINFO 0)
-endif()
-
if (ANDROID AND COMPILER_RT_HAS_LIBDL)
# Android's libstdc++ has a dependency on libdl.
list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
index 005bd6d..b4702339 100755
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
@@ -139,7 +139,6 @@ if [[ ! -f ${LLVM_BUILD}/build.ninja ]]; then
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_ZLIB=ON \
-DLLVM_ENABLE_ZSTD=OFF \
- -DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_THREADS=OFF \
$LLVM_SRC
fi
diff --git a/compiler-rt/lib/xray/tests/CMakeLists.txt b/compiler-rt/lib/xray/tests/CMakeLists.txt
index 0a428b9..4c7e92b 100644
--- a/compiler-rt/lib/xray/tests/CMakeLists.txt
+++ b/compiler-rt/lib/xray/tests/CMakeLists.txt
@@ -54,11 +54,6 @@ set(XRAY_UNITTEST_LINK_FLAGS
${COMPILER_RT_CXX_LINK_LIBS})
if (NOT APPLE)
- # Needed by LLVMSupport.
- append_list_if(
- LLVM_ENABLE_TERMINFO
- -l${COMPILER_RT_TERMINFO_LIB} XRAY_UNITTEST_LINK_FLAGS)
-
# We add the library directories one at a time in our CFLAGS.
foreach (DIR ${LLVM_LIBRARY_DIR})
list(APPEND XRAY_UNITTEST_LINK_FLAGS -L${DIR})