Skip to content

Commit c8bc34c

Browse files
committed
[test] Use the just-built Clang when using new driver
Make sure we execute the just-built Clang for linking jobs in the new driver. This ensures we link against the correct compiler-rt libraries. rdar://132122596
1 parent ed38b93 commit c8bc34c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/lit.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ config.link = lit.util.which('link', config.environment.get('PATH', '')) or
368368

369369
config.color_output = lit_config.params.get('color_output', None) is not None
370370

371+
# Tell the (new) driver to invoke the Clang we've inferred. The
372+
# legacy driver uses ld by default.
373+
config.environment['SWIFT_DRIVER_CLANG_EXEC'] = config.clang
374+
config.environment['SWIFT_DRIVER_CLANGXX_EXEC'] = config.clangxx
375+
371376
# Find the resource directory. Assume it's near the swift compiler if not set.
372377
test_resource_dir = lit_config.params.get('test_resource_dir')
373378
config.resource_dir_opt = ""

0 commit comments

Comments
 (0)