[llvm] 6da4f11 - Revert "[CMake] Fix ncurses/zlib in LLVM_SYSTEM_LIBS for Windows GNU"
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 02:23:04 PDT 2020
Author: Hans Wennborg
Date: 2020-08-25T11:22:50+02:00
New Revision: 6da4f1199e7c3129f6e2ef7a24a2c75e386be32d
URL: https://github.com/llvm/llvm-project/commit/6da4f1199e7c3129f6e2ef7a24a2c75e386be32d
DIFF: https://github.com/llvm/llvm-project/commit/6da4f1199e7c3129f6e2ef7a24a2c75e386be32d.diff
LOG: Revert "[CMake] Fix ncurses/zlib in LLVM_SYSTEM_LIBS for Windows GNU"
It broke Chromium's llvm build:
CMake Error at lib/Support/CMakeLists.txt:13 (string):
string sub-command REGEX, mode REPLACE: regex "^()" matched an empty
string.
Call Stack (most recent call first):
lib/Support/CMakeLists.txt:223 (get_system_libname)
This reverts commit 2b3807d822c50d361ae67184b6de5a41bd7b1bba / https://reviews.llvm.org/D86434
Added:
Modified:
llvm/lib/Support/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 09838edbb073..a571d269b39f 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -4,14 +4,14 @@ endif()
function(get_system_libname libpath libname)
get_filename_component(libpath ${libpath} NAME)
- set(prefixes ${CMAKE_FIND_LIBRARY_PREFIXES})
- set(suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
- list(FILTER prefixes EXCLUDE REGEX "^\\s*$")
- list(FILTER suffixes EXCLUDE REGEX "^\\s*$")
- string(REPLACE ";" "|" prefixes "${prefixes}")
- string(REPLACE ";" "|" suffixes "${suffixes}")
- string(REGEX REPLACE "^(${prefixes})" "" libpath ${libpath})
- string(REGEX REPLACE "(${suffixes})$" "" libpath ${libpath})
+ if( CMAKE_FIND_LIBRARY_PREFIXES )
+ string(REPLACE ";" "|" PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
+ string(REGEX REPLACE "^(${PREFIXES})" "" libpath ${libpath})
+ endif()
+ if( CMAKE_FIND_LIBRARY_SUFFIXES )
+ string(REPLACE ";" "|" SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
+ string(REGEX REPLACE "(${SUFFIXES})$" "" libpath ${libpath})
+ endif()
set(${libname} "${libpath}" PARENT_SCOPE)
endfunction()
More information about the llvm-commits
mailing list