Skip to content

Commit a94f434

Browse files
committed
Fixed the default darwin xcrun toolchain logic.
1 parent 1031abe commit a94f434

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

utils/build-script

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import platform
1818
import sys
1919
import time
2020

21+
from build_swift import defaults
2122
from build_swift import driver_arguments
2223

2324
from swift_build_support.swift_build_support import (
@@ -1041,10 +1042,12 @@ def main_normal():
10411042
shell.dry_run = args.dry_run
10421043

10431044
# Prepare and validate toolchain
1044-
env_toolchain = os.environ.get('TOOLCHAINS')
10451045
if args.darwin_xcrun_toolchain is None:
1046-
diagnostics.note('using toolchain {}'.format(env_toolchain))
1047-
args.darwin_xcrun_toolchain = env_toolchain
1046+
xcrun_toolchain = os.environ.get('TOOLCHAINS',
1047+
defaults.DARWIN_XCRUN_TOOLCHAIN)
1048+
1049+
diagnostics.note('Using toolchain {}'.format(xcrun_toolchain))
1050+
args.darwin_xcrun_toolchain = xcrun_toolchain
10481051

10491052
toolchain = host_toolchain(xcrun_toolchain=args.darwin_xcrun_toolchain)
10501053
os.environ['TOOLCHAINS'] = args.darwin_xcrun_toolchain

0 commit comments

Comments
 (0)