Skip to content

[Build Script Helper] Only export toolchain executable paths when the executable exist and bring back wrongly-removed tools. #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import sys

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

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