@@ -47,6 +47,7 @@ def default_args(self):
47
47
"""
48
48
return Namespace (host_cc = "/path/to/clang" ,
49
49
host_cxx = "/path/to/clang++" ,
50
+ host_swiftc = "/path/to/swiftc" ,
50
51
host_libtool = "/path/to/libtool" ,
51
52
host_ar = "/path/to/ar" ,
52
53
enable_asan = False ,
@@ -81,6 +82,7 @@ def cmake(self, args):
81
82
toolchain = host_toolchain ()
82
83
toolchain .cc = args .host_cc
83
84
toolchain .cxx = args .host_cxx
85
+ toolchain .swiftc = args .host_swiftc
84
86
toolchain .libtool = args .host_libtool
85
87
toolchain .ar = args .host_ar
86
88
if args .distcc :
@@ -98,6 +100,7 @@ def test_common_options_defaults(self):
98
100
["-G" , "Ninja" ,
99
101
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
100
102
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
103
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
101
104
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
102
105
"-DCMAKE_AR:PATH=/path/to/ar" ,
103
106
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -112,6 +115,7 @@ def test_common_options_asan(self):
112
115
"-DLLVM_USE_SANITIZER=Address" ,
113
116
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
114
117
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
118
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
115
119
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
116
120
"-DCMAKE_AR:PATH=/path/to/ar" ,
117
121
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -126,6 +130,7 @@ def test_common_options_ubsan(self):
126
130
"-DLLVM_USE_SANITIZER=Undefined" ,
127
131
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
128
132
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
133
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
129
134
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
130
135
"-DCMAKE_AR:PATH=/path/to/ar" ,
131
136
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -140,6 +145,7 @@ def test_common_options_tsan(self):
140
145
"-DLLVM_USE_SANITIZER=Thread" ,
141
146
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
142
147
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
148
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
143
149
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
144
150
"-DCMAKE_AR:PATH=/path/to/ar" ,
145
151
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -155,6 +161,7 @@ def test_common_options_asan_ubsan(self):
155
161
"-DLLVM_USE_SANITIZER=Address;Undefined" ,
156
162
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
157
163
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
164
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
158
165
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
159
166
"-DCMAKE_AR:PATH=/path/to/ar" ,
160
167
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -170,6 +177,7 @@ def test_common_options_ubsan_tsan(self):
170
177
"-DLLVM_USE_SANITIZER=Undefined;Thread" ,
171
178
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
172
179
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
180
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
173
181
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
174
182
"-DCMAKE_AR:PATH=/path/to/ar" ,
175
183
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -186,6 +194,7 @@ def test_common_options_asan_ubsan_tsan(self):
186
194
"-DLLVM_USE_SANITIZER=Address;Undefined;Thread" ,
187
195
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
188
196
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
197
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
189
198
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
190
199
"-DCMAKE_AR:PATH=/path/to/ar" ,
191
200
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -200,6 +209,7 @@ def test_common_options_lsan(self):
200
209
"-DLLVM_USE_SANITIZER=Leaks" ,
201
210
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
202
211
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
212
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
203
213
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
204
214
"-DCMAKE_AR:PATH=/path/to/ar" ,
205
215
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -214,6 +224,7 @@ def test_common_options_coverage_sanitizer(self):
214
224
"-DLLVM_USE_SANITIZE_COVERAGE=ON" ,
215
225
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
216
226
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
227
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
217
228
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
218
229
"-DCMAKE_AR:PATH=/path/to/ar" ,
219
230
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -228,6 +239,7 @@ def test_common_options_export_compile_commands(self):
228
239
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ,
229
240
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
230
241
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
242
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
231
243
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
232
244
"-DCMAKE_AR:PATH=/path/to/ar" ,
233
245
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -243,6 +255,7 @@ def test_common_options_distcc(self):
243
255
"-DCMAKE_CXX_COMPILER_LAUNCHER:PATH=" + self .mock_distcc_path (),
244
256
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
245
257
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
258
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
246
259
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
247
260
"-DCMAKE_AR:PATH=/path/to/ar" ,
248
261
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -258,6 +271,7 @@ def test_common_options_sccache(self):
258
271
"-DCMAKE_CXX_COMPILER_LAUNCHER:PATH=" + self .mock_sccache_path (),
259
272
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
260
273
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
274
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
261
275
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
262
276
"-DCMAKE_AR:PATH=/path/to/ar" ,
263
277
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -276,6 +290,7 @@ def test_common_options_launcher(self):
276
290
"-DCMAKE_CXX_COMPILER_LAUNCHER:PATH=" + cmake_cxx_launcher ,
277
291
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
278
292
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
293
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
279
294
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
280
295
"-DCMAKE_AR:PATH=/path/to/ar" ,
281
296
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -289,6 +304,7 @@ def test_common_options_xcode(self):
289
304
["-G" , "Xcode" ,
290
305
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
291
306
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
307
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
292
308
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
293
309
"-DCMAKE_AR:PATH=/path/to/ar" ,
294
310
"-DCMAKE_CONFIGURATION_TYPES=" +
@@ -303,6 +319,7 @@ def test_common_options_clang_compiler_version(self):
303
319
["-G" , "Ninja" ,
304
320
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
305
321
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
322
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
306
323
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
307
324
"-DCMAKE_AR:PATH=/path/to/ar" ,
308
325
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -316,6 +333,7 @@ def test_common_options_clang_user_visible_version(self):
316
333
["-G" , "Ninja" ,
317
334
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
318
335
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
336
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
319
337
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
320
338
"-DCMAKE_AR:PATH=/path/to/ar" ,
321
339
"-DLLVM_VERSION_MAJOR:STRING=9" ,
@@ -335,6 +353,7 @@ def test_common_options_build_ninja(self):
335
353
["-G" , "Ninja" ,
336
354
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
337
355
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
356
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
338
357
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
339
358
"-DCMAKE_AR:PATH=/path/to/ar" ,
340
359
"-DCMAKE_MAKE_PROGRAM=" + self .which_ninja (args )])
@@ -359,6 +378,7 @@ def test_common_options_full(self):
359
378
"-DCMAKE_CXX_COMPILER_LAUNCHER:PATH=" + self .mock_distcc_path (),
360
379
"-DCMAKE_C_COMPILER:PATH=/path/to/clang" ,
361
380
"-DCMAKE_CXX_COMPILER:PATH=/path/to/clang++" ,
381
+ "-DCMAKE_Swift_COMPILER:PATH=/path/to/swiftc" ,
362
382
"-DCMAKE_LIBTOOL:PATH=/path/to/libtool" ,
363
383
"-DCMAKE_AR:PATH=/path/to/ar" ,
364
384
"-DCMAKE_CONFIGURATION_TYPES=" +
0 commit comments