Skip to content

Commit a024e6e

Browse files
committed
[Build Script Helper] Only export toolchain executable paths when they exists and bring back wrongly-removed tools.
1 parent 599b5b6 commit a024e6e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Utilities/build-script-helper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import sys
1111

1212
# Tools constructed as a part of the a development build toolchain
13-
driver_toolchain_tools = ['swift', 'swift-frontend', 'clang', 'swift-help']
13+
driver_toolchain_tools = ['swift', 'swift-frontend', 'clang', 'swift-help',
14+
'swift-autolink-extract', 'lldb']
1415

1516
def call_output(cmd, cwd=None, stderr=False, verbose=False):
1617
"""Calls a subprocess for its return data."""
@@ -128,7 +129,9 @@ def handle_invocation(toolchain_bin, args):
128129
swiftpm('build', swift_exec, swiftpm_args, env)
129130
elif args.action == 'test':
130131
for tool in driver_toolchain_tools:
131-
env['SWIFT_DRIVER_' + tool.upper().replace('-','_') + '_EXEC'] = '%s' % (os.path.join(toolchain_bin, tool))
132+
tool_path = os.path.join(toolchain_bin, tool)
133+
if os.path.exists(tool_path):
134+
env['SWIFT_DRIVER_' + tool.upper().replace('-','_') + '_EXEC'] = '%s' % (tool_path)
132135
env['SWIFT_EXEC'] = '%sc' % (swift_exec)
133136
test_args = swiftpm_args
134137
if should_test_parallel():

0 commit comments

Comments
 (0)