[PATCH] D86173: Don't look for terminfo libs when LLVM_ENABLE_TERMINFO=OFF
Harmen Stoppels via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 15:02:31 PDT 2020
haampie created this revision.
haampie added reviewers: JDevlieghere, srj, phosek.
Herald added subscribers: llvm-commits, Sanitizers, mgorny.
Herald added projects: Sanitizers, LLVM.
haampie requested review of this revision.
https://reviews.llvm.org/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`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86173
Files:
compiler-rt/cmake/config-ix.cmake
llvm/cmake/config-ix.cmake
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -152,7 +152,9 @@
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()
Index: compiler-rt/cmake/config-ix.cmake
===================================================================
--- compiler-rt/cmake/config-ix.cmake
+++ compiler-rt/cmake/config-ix.cmake
@@ -138,7 +138,9 @@
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()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86173.286405.patch
Type: text/x-patch
Size: 1097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200818/3f383ef6/attachment.bin>
More information about the llvm-commits
mailing list