Skip to content

Commit b62fc8f

Browse files
authored
Merge pull request #431 from compnerd/compnerd/flags
tests: add the ability to pass along CMAKE_Swift_FLAGS
2 parents 9302bff + 47ffea7 commit b62fc8f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ if(ENABLE_TESTING)
104104
LIBDISPATCH_BUILD_DIR=${XCTEST_PATH_TO_LIBDISPATCH_BUILD}
105105
LIBDISPATCH_OVERLAY_DIR=${XCTEST_PATH_TO_LIBDISPATCH_BUILD}/src/swift
106106
SWIFT_EXEC=${CMAKE_Swift_COMPILER}
107+
SWIFT_FLAGS=${CMAKE_Swift_FLAGS}
107108
$<TARGET_FILE:Python3::Interpreter> ${LIT_COMMAND} -sv ${CMAKE_SOURCE_DIR}/Tests/Functional
108109
COMMENT
109110
"Running XCTest functional test suite"

Tests/Functional/lit.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ from pkg_resources import parse_version
1111
import os
1212
import platform
1313
import tempfile
14+
import shlex
1415
import sys
1516
import lit
1617
import pipes
@@ -42,6 +43,7 @@ def _getenv(name):
4243
built_products_dir = _getenv('BUILT_PRODUCTS_DIR')
4344
# Force tests to build with -swift-version 5 for now.
4445
swift_exec = [ _getenv('SWIFT_EXEC'), '-swift-version', '5', ]
46+
swift_exec.extend(shlex.split(os.getenv('SWIFT_FLAGS', '')))
4547
if not platform.system() == 'Windows':
4648
swift_exec.extend(['-Xlinker', '-rpath', '-Xlinker', built_products_dir,])
4749
swift_exec.extend([

0 commit comments

Comments
 (0)