Skip to content

Commit 8a0ff51

Browse files
committed
---
yaml --- r: 318271 b: refs/heads/master-rebranch c: ca86c79 h: refs/heads/master i: 318269: 5d24a45 318267: 3d1421e 318263: 3a3ad1d 318255: 71a3c25 318239: 7ddabf4 318207: aaffd5a
1 parent 9d6286d commit 8a0ff51

File tree

5 files changed

+19
-34
lines changed

5 files changed

+19
-34
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,4 +1457,4 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14571457
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14581458
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14591459
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1460-
refs/heads/master-rebranch: d56cd15b2b8094b3115209224a5332006171d78e
1460+
refs/heads/master-rebranch: ca86c7946ddb43b8976e56d32dad70568d803e54

branches/master-rebranch/stdlib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ else()
3030
set(CMAKE_C_COMPILER "${SWIFT_NATIVE_LLVM_TOOLS_PATH}/clang")
3131
endif()
3232

33-
set(CMAKE_CXX_COMPILER_ARG1 "")
34-
set(CMAKE_C_COMPILER_ARG1 "")
33+
set(CMAKE_C_COMPILER_LAUNCHER "")
34+
set(CMAKE_CXX_COMPILER_LAUNCHER "")
3535
# The sanitizers require using the same version of the compiler for
3636
# everything and there are various places where we link runtime code with
3737
# code built by the host compiler. Disable sanitizers for the runtime for

branches/master-rebranch/utils/build-script-impl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,21 +1551,6 @@ eval COMMON_CMAKE_OPTIONS=(${COMMON_CMAKE_OPTIONS})
15511551
eval EXTRA_CMAKE_OPTIONS=(${EXTRA_CMAKE_OPTIONS})
15521552
eval BUILD_ARGS=(${BUILD_ARGS})
15531553

1554-
if [[ -n "${DISTCC}" ]]; then
1555-
if [[ "$(uname -s)" == "Darwin" ]] ; then
1556-
# These are normally deduced by CMake, but when the compiler is set to
1557-
# distcc which is installed elsewhere, we need to set them explicitly.
1558-
COMMON_CMAKE_OPTIONS=(
1559-
"${COMMON_CMAKE_OPTIONS[@]}" "-DCMAKE_AR=$(xcrun_find_tool ar)"
1560-
"-DCMAKE_LINKER=$(xcrun_find_tool ld)"
1561-
"-DCMAKE_NM=$(xcrun_find_tool nm)"
1562-
"-DCMAKE_OBJDUMP=$(xcrun_find_tool objdump)"
1563-
"-DCMAKE_RANLIB=$(xcrun_find_tool ranlib)"
1564-
"-DCMAKE_STRIP=$(xcrun_find_tool strip)"
1565-
)
1566-
fi
1567-
fi
1568-
15691554
eval CMAKE_BUILD=("${DISTCC_PUMP}" "${CMAKE}" "--build")
15701555

15711556

branches/master-rebranch/utils/swift_build_support/swift_build_support/cmake.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,12 @@ def common_options(self):
104104
define("CMAKE_EXPORT_COMPILE_COMMANDS", "ON")
105105

106106
if args.distcc:
107-
define("CMAKE_C_COMPILER:PATH", toolchain.distcc)
108-
define("CMAKE_C_COMPILER_ARG1", toolchain.cc)
109-
define("CMAKE_CXX_COMPILER:PATH", toolchain.distcc)
110-
define("CMAKE_CXX_COMPILER_ARG1", toolchain.cxx)
111-
else:
112-
define("CMAKE_C_COMPILER:PATH", toolchain.cc)
113-
define("CMAKE_CXX_COMPILER:PATH", toolchain.cxx)
114-
define("CMAKE_LIBTOOL:PATH", toolchain.libtool)
107+
define("CMAKE_C_COMPILER_LAUNCHER:PATH", toolchain.distcc)
108+
define("CMAKE_CXX_COMPILER_LAUNCHER:PATH", toolchain.distcc)
109+
110+
define("CMAKE_C_COMPILER:PATH", toolchain.cc)
111+
define("CMAKE_CXX_COMPILER:PATH", toolchain.cxx)
112+
define("CMAKE_LIBTOOL:PATH", toolchain.libtool)
115113

116114
if args.cmake_generator == 'Xcode':
117115
define("CMAKE_CONFIGURATION_TYPES",

branches/master-rebranch/utils/swift_build_support/tests/test_cmake.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,11 @@ def test_common_options_distcc(self):
205205
self.assertEqual(
206206
list(cmake.common_options()),
207207
["-G", "Ninja",
208-
"-DCMAKE_C_COMPILER:PATH=" + self.mock_distcc_path(),
209-
"-DCMAKE_C_COMPILER_ARG1=/path/to/clang",
210-
"-DCMAKE_CXX_COMPILER:PATH=" + self.mock_distcc_path(),
211-
"-DCMAKE_CXX_COMPILER_ARG1=/path/to/clang++",
208+
"-DCMAKE_C_COMPILER_LAUNCHER:PATH=" + self.mock_distcc_path(),
209+
"-DCMAKE_CXX_COMPILER_LAUNCHER:PATH=" + self.mock_distcc_path(),
210+
"-DCMAKE_C_COMPILER:PATH=/path/to/clang",
211+
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++",
212+
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool",
212213
"-DCMAKE_MAKE_PROGRAM=" + self.which_ninja(args)])
213214

214215
def test_common_options_xcode(self):
@@ -290,10 +291,11 @@ def test_common_options_full(self):
290291
["-G", "Xcode",
291292
"-DLLVM_USE_SANITIZER=Address;Undefined",
292293
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
293-
"-DCMAKE_C_COMPILER:PATH=" + self.mock_distcc_path(),
294-
"-DCMAKE_C_COMPILER_ARG1=/path/to/clang",
295-
"-DCMAKE_CXX_COMPILER:PATH=" + self.mock_distcc_path(),
296-
"-DCMAKE_CXX_COMPILER_ARG1=/path/to/clang++",
294+
"-DCMAKE_C_COMPILER_LAUNCHER:PATH=" + self.mock_distcc_path(),
295+
"-DCMAKE_CXX_COMPILER_LAUNCHER:PATH=" + self.mock_distcc_path(),
296+
"-DCMAKE_C_COMPILER:PATH=/path/to/clang",
297+
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++",
298+
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool",
297299
"-DCMAKE_CONFIGURATION_TYPES=" +
298300
"Debug;Release;MinSizeRel;RelWithDebInfo",
299301
"-DLLVM_VERSION_MAJOR:STRING=9",

0 commit comments

Comments
 (0)