Skip to content

Commit f65f80c

Browse files
committed
Merge commit 'refs/am/changes/e0c717069d3d11580e9e5410947410ffba2fa7bb_swift/master-next' into HEAD
Conflicts: lldb/CMakeLists.txt lldb/test/API/CMakeLists.txt
2 parents 85bc5b6 + e0c7170 commit f65f80c

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

lldb/CMakeLists.txt

+8-9
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,19 @@ if(LLDB_INCLUDE_TESTS)
109109
set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/dsymutil${CMAKE_EXECUTABLE_SUFFIX}")
110110
set(LLDB_DEFAULT_TEST_FILECHECK "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/FileCheck${CMAKE_EXECUTABLE_SUFFIX}")
111111

112-
# BEGIN - Swift Mods
113-
set(LLDB_DEFAULT_TEST_C_COMPILER "${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
114-
set(LLDB_DEFAULT_TEST_CXX_COMPILER "${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}")
115-
# END - Swift Mods
112+
if (TARGET clang)
113+
set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
114+
else()
115+
set(LLDB_DEFAULT_TEST_COMPILER "")
116+
endif()
116117

117118
set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing")
118-
set(LLDB_TEST_C_COMPILER "${LLDB_DEFAULT_TEST_C_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
119-
set(LLDB_TEST_CXX_COMPILER "${LLDB_DEFAULT_TEST_CXX_COMPILER}" CACHE PATH "C++ Compiler to use for building LLDB test inferiors")
119+
set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
120120
set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles")
121121
set(LLDB_TEST_FILECHECK "${LLDB_DEFAULT_TEST_FILECHECK}" CACHE PATH "FileCheck used for testing purposes")
122122

123-
if (("${LLDB_TEST_C_COMPILER}" STREQUAL "") OR
124-
("${LLDB_TEST_CXX_COMPILER}" STREQUAL ""))
125-
message(FATAL_ERROR "LLDB test compilers not specified. Tests will not run.")
123+
if ("${LLDB_TEST_COMPILER}" STREQUAL "")
124+
message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run.")
126125
endif()
127126

128127
add_custom_target(lldb-test-deps)

lldb/docs/resources/build.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ suite.
186186
::
187187

188188
> cmake -G Ninja \
189-
-DLLDB_TEST_C_COMPILER=<path to C compiler> \
190-
-DLLDB_TEST_CXX_COMPILER=<path to C++ compiler> \
189+
-DLLDB_TEST_COMPILER=<path to C compiler> \
191190
<path to root of llvm source tree>
192191

193192
It is strongly recommend to use a release build for the compiler to speed up
@@ -227,7 +226,7 @@ Sample command line:
227226
> cmake -G Ninja^
228227
-DLLDB_TEST_DEBUG_TEST_CRASHES=1^
229228
-DPYTHON_HOME=C:\Python35^
230-
-DLLDB_TEST_C_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
229+
-DLLDB_TEST_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
231230
<path to root of llvm source tree>
232231

233232

lldb/docs/resources/test.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ target.
4242

4343
By default, the ``check-lldb`` target builds the test programs with the same
4444
compiler that was used to build LLDB. To build the tests with a different
45-
compiler, you can set the ``LLDB_TEST_C_COMPILER`` or the
46-
``LLDB_TEST_CXX_COMPILER`` CMake variables.
45+
compiler, you can set the ``LLDB_TEST_COMPILER`` CMake variable.
4746

4847
It is possible to customize the architecture of the test binaries and compiler
4948
used by appending ``-A`` and ``-C`` options respectively to the CMake variable

lldb/test/API/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ list(APPEND LLDB_TEST_COMMON_ARGS
6565
--executable ${LLDB_TEST_EXECUTABLE}
6666
--dsymutil ${LLDB_TEST_DSYMUTIL}
6767
--filecheck ${LLDB_TEST_FILECHECK}
68-
-C ${LLDB_TEST_C_COMPILER}
68+
--compiler ${LLDB_TEST_COMPILER}
6969
${SWIFT_TEST_ARGS}
7070
)
7171

0 commit comments

Comments
 (0)