[Lldb-commits] [lldb] 8acaceb - [lldb] Fix LLDB_DEFAULT_TEST_ARCH for standalone builds

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 22 17:04:49 PDT 2020


Author: Jonas Devlieghere
Date: 2020-07-22T17:04:42-07:00
New Revision: 8acaceb14c6c6f91996beb27742119844c04292f

URL: https://github.com/llvm/llvm-project/commit/8acaceb14c6c6f91996beb27742119844c04292f
DIFF: https://github.com/llvm/llvm-project/commit/8acaceb14c6c6f91996beb27742119844c04292f.diff

LOG: [lldb] Fix LLDB_DEFAULT_TEST_ARCH for standalone builds

LLVM_TARGET_ARCH is not exported by LLVM so we can't use it from
standalone builds. Default to the architecture in LLVM_HOST_TRIPLE when
no LLDB_DEFAULT_TEST_ARCH was specified.

Added: 
    

Modified: 
    lldb/test/API/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index 34f3522c8dfe..a80992f287e9 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -13,10 +13,10 @@ function(add_python_test_target name test_script args comment)
   add_dependencies(${name} lldb-test-deps)
 endfunction()
 
-# The default architecture with which to compile test executables is the default LLVM target
-# architecture, which itself defaults to the host architecture.
-string(TOLOWER "${LLVM_TARGET_ARCH}" LLDB_DEFAULT_TEST_ARCH)
-if( LLDB_DEFAULT_TEST_ARCH STREQUAL "host" )
+# The default architecture with which to compile test executables is the
+# default LLVM target architecture, which itself defaults to the host
+# architecture.
+if(NOT LLDB_DEFAULT_TEST_ARCH)
   string(REGEX MATCH "^[^-]*" LLDB_DEFAULT_TEST_ARCH ${LLVM_HOST_TRIPLE})
 endif ()
 


        


More information about the lldb-commits mailing list