[compiler-rt] 495f91f - [CMake] Don't look for terminfo libs when LLVM_ENABLE_TERMINFO=OFF
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 10:31:54 PDT 2020
Author: Petr Hosek
Date: 2020-08-19T10:31:42-07:00
New Revision: 495f91fd33d492941c39424a32cf24bcfe192f35
URL: https://github.com/llvm/llvm-project/commit/495f91fd33d492941c39424a32cf24bcfe192f35
DIFF: https://github.com/llvm/llvm-project/commit/495f91fd33d492941c39424a32cf24bcfe192f35.diff
LOG: [CMake] Don't look for terminfo libs when LLVM_ENABLE_TERMINFO=OFF
D85820 introduced a bug where LLVM_ENABLE_TERMINFO was set to true when
the library was found, even when the user had set
-DLLVM_ENABLE_TERMINFO=OFF.
Patch By: haampie
Differential Revision: https://reviews.llvm.org/D86173
Added:
Modified:
compiler-rt/cmake/config-ix.cmake
llvm/cmake/config-ix.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index c9d0da2fc089..1428a514b55a 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -138,7 +138,9 @@ if(LLVM_ENABLE_TERMINFO STREQUAL FORCE_ON)
else()
set(MAYBE_REQUIRED)
endif()
-find_library(COMPILER_RT_TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED})
+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()
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index 67e2eb1cec14..6e8f476a41aa 100644
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -152,7 +152,9 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
else()
set(MAYBE_REQUIRED)
endif()
- find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED})
+ if(LLVM_ENABLE_TERMINFO)
+ find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED})
+ endif()
if(TERMINFO_LIB)
set(LLVM_ENABLE_TERMINFO 1)
else()
More information about the llvm-commits
mailing list