From 55eec2ba96bd9c19ccb5d4d13cb8c88d4abcebc6 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 29 Oct 2019 08:20:58 -0700 Subject: [PATCH] build: workaround stale caches (NFC) `LLVM_DEFAULT_TARGET_TRIPLE` is a cached variable, which means that it may actually be unset. Furthermore, in standalone builds, the variable may be fully undefined. Apply the regular expression over the empty string in such a case. This should improve the state of the green dragon bot. --- lldb/tools/debugserver/source/MacOSX/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt b/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt index 6d8e1ee449e349..59812b27dff28f 100644 --- a/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt +++ b/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt @@ -10,7 +10,7 @@ # CFLAGS etc explicitly. Switching on LLVM_HOST_TRIPLE is also an option, # but it breaks down when cross-compiling. -string(REGEX MATCH "^[^-]*" LLDB_DEBUGSERVER_ARCH ${LLVM_DEFAULT_TARGET_TRIPLE}) +string(REGEX MATCH "^[^-]*" LLDB_DEBUGSERVER_ARCH "${LLVM_DEFAULT_TARGET_TRIPLE}") if("${LLDB_DEBUGSERVER_ARCH}" MATCHES ".*arm.*") list(APPEND SOURCES arm/DNBArchImpl.cpp arm64/DNBArchImplARM64.cpp)