[Lldb-commits] [lldb] d52b36e - [CMake] Remove unused variable LLDB_TEST_CXX_COMPILER
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 24 14:47:15 PDT 2019
Author: Jonas Devlieghere
Date: 2019-10-24T14:47:07-07:00
New Revision: d52b36e354e94f518985833231375365a7cc334b
URL: https://github.com/llvm/llvm-project/commit/d52b36e354e94f518985833231375365a7cc334b
DIFF: https://github.com/llvm/llvm-project/commit/d52b36e354e94f518985833231375365a7cc334b.diff
LOG: [CMake] Remove unused variable LLDB_TEST_CXX_COMPILER
CMake allows you to set a custom CXX compiler for the API test suite.
However, this variable is never used, because dotest uses the same
compiler to build C and CXX sources.
I'm not sure if this variable was added with the intention of supporting
a different compiler or if this is just a remnant of old functionality.
Given that this hasn't been working for a while, I assume it's safe to
remove.
Differential revision: https://reviews.llvm.org/D69401
Added:
Modified:
lldb/CMakeLists.txt
lldb/docs/resources/build.rst
lldb/docs/resources/test.rst
lldb/test/API/CMakeLists.txt
Removed:
################################################################################
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index 527d087ab87f..588f6f72b795 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -91,22 +91,18 @@ if(LLDB_INCLUDE_TESTS)
set(LLDB_DEFAULT_TEST_FILECHECK "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/FileCheck${CMAKE_EXECUTABLE_SUFFIX}")
if (TARGET clang)
- set(LLDB_DEFAULT_TEST_C_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
- set(LLDB_DEFAULT_TEST_CXX_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}")
+ set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
else()
- set(LLDB_DEFAULT_TEST_C_COMPILER "")
- set(LLDB_DEFAULT_TEST_CXX_COMPILER "")
+ set(LLDB_DEFAULT_TEST_COMPILER "")
endif()
set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing")
- set(LLDB_TEST_C_COMPILER "${LLDB_DEFAULT_TEST_C_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
- set(LLDB_TEST_CXX_COMPILER "${LLDB_DEFAULT_TEST_CXX_COMPILER}" CACHE PATH "C++ Compiler to use for building LLDB test inferiors")
+ set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles")
set(LLDB_TEST_FILECHECK "${LLDB_DEFAULT_TEST_FILECHECK}" CACHE PATH "FileCheck used for testing purposes")
- if (("${LLDB_TEST_C_COMPILER}" STREQUAL "") OR
- ("${LLDB_TEST_CXX_COMPILER}" STREQUAL ""))
- message(FATAL_ERROR "LLDB test compilers not specified. Tests will not run.")
+ if ("${LLDB_TEST_COMPILER}" STREQUAL "")
+ message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run.")
endif()
add_custom_target(lldb-test-deps)
diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index f0a5273cb87f..ec938f41e21c 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -186,8 +186,7 @@ suite.
::
> cmake -G Ninja \
- -DLLDB_TEST_C_COMPILER=<path to C compiler> \
- -DLLDB_TEST_CXX_COMPILER=<path to C++ compiler> \
+ -DLLDB_TEST_COMPILER=<path to C compiler> \
<path to root of llvm source tree>
It is strongly recommend to use a release build for the compiler to speed up
@@ -227,7 +226,7 @@ Sample command line:
> cmake -G Ninja^
-DLLDB_TEST_DEBUG_TEST_CRASHES=1^
-DPYTHON_HOME=C:\Python35^
- -DLLDB_TEST_C_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
+ -DLLDB_TEST_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
<path to root of llvm source tree>
diff --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst
index df1f7129e0ac..9966ad12eac2 100644
--- a/lldb/docs/resources/test.rst
+++ b/lldb/docs/resources/test.rst
@@ -42,8 +42,7 @@ target.
By default, the ``check-lldb`` target builds the test programs with the same
compiler that was used to build LLDB. To build the tests with a
diff erent
-compiler, you can set the ``LLDB_TEST_C_COMPILER`` or the
-``LLDB_TEST_CXX_COMPILER`` CMake variables.
+compiler, you can set the ``LLDB_TEST_COMPILER`` CMake variable.
It is possible to customize the architecture of the test binaries and compiler
used by appending ``-A`` and ``-C`` options respectively to the CMake variable
diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index 0708e804f49c..4552e1062d5e 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -48,7 +48,7 @@ list(APPEND LLDB_TEST_COMMON_ARGS
--executable ${LLDB_TEST_EXECUTABLE}
--dsymutil ${LLDB_TEST_DSYMUTIL}
--filecheck ${LLDB_TEST_FILECHECK}
- -C ${LLDB_TEST_C_COMPILER}
+ --compiler ${LLDB_TEST_COMPILER}
)
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
More information about the lldb-commits
mailing list