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.
This commit is contained in:
Saleem Abdulrasool 2019-10-29 08:20:58 -07:00
parent a22282be54
commit 55eec2ba96

View File

@ -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)