mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
DebugServer: be more lenient about the target triple
When building standalone, `LLVM_DEFAULT_TARGET_TRIPLE` may be undefined. Matching against an empty string does not work as desired in CMake, so, fallback to the old behaviour, defaulting `LLDB_DEBUGSERVER_ARCH` to `CMAKE_OSX_ARCHITECTURES`.
This commit is contained in:
@@ -10,7 +10,11 @@
|
||||
# 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}")
|
||||
if(LLVM_DEFAULT_TARGET_TRIPLE)
|
||||
string(REGEX MATCH "^[^-]*" LLDB_DEBUGSERVER_ARCH ${LLVM_DEFAULT_TARGET_TRIPLE})
|
||||
else()
|
||||
set(LLDB_DEBUGSERVER_ARCH ${CMAKE_OSX_ARCHITECTURES})
|
||||
endif()
|
||||
|
||||
if("${LLDB_DEBUGSERVER_ARCH}" MATCHES ".*arm.*")
|
||||
list(APPEND SOURCES arm/DNBArchImpl.cpp arm64/DNBArchImplARM64.cpp)
|
||||
|
||||
Reference in New Issue
Block a user