Skip to content

Commit 82b1d9c

Browse files
build: Rename prefer_just_built_toolchain -> prefer_native_toolchain
1 parent 5a66841 commit 82b1d9c

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

utils/swift_build_support/swift_build_support/cmake.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,16 @@ def __iadd__(self, other):
9797

9898
class CMake(object):
9999

100-
def __init__(self, args, toolchain, prefer_just_built_toolchain=False):
101-
"""If prefer_just_built_toolchain is set to True, we set the clang, clang++,
102-
and Swift compilers from the installed toolchain.
100+
def __init__(self, args, toolchain, prefer_native_toolchain=False):
101+
"""If prefer_native_toolchain is set to True, we set the clang, clang++,
102+
and Swift compilers from the toolchain explicitly specified by the
103+
native-*-tools-path options or just installed toolchain if the options
104+
are not specified. If prefer_native_toolchain is set to False, we use
105+
system defaults.
103106
"""
104107
self.args = args
105108
self.toolchain = toolchain
106-
self.prefer_just_built_toolchain = prefer_just_built_toolchain
109+
self.prefer_native_toolchain = prefer_native_toolchain
107110

108111
def common_options(self, product=None):
109112
"""Return options used for all products, including LLVM/Clang
@@ -146,7 +149,7 @@ def common_options(self, product=None):
146149
if args.cmake_cxx_launcher:
147150
define("CMAKE_CXX_COMPILER_LAUNCHER:PATH", args.cmake_cxx_launcher)
148151

149-
if self.prefer_just_built_toolchain and product:
152+
if self.prefer_native_toolchain and product:
150153
toolchain_path = product.native_toolchain_path(args.host_target)
151154
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER',
152155
os.path.join(toolchain_path, 'bin', 'swiftc'))

utils/swift_build_support/swift_build_support/products/cmake_product.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ def is_verbose(self):
2424
return self.args.verbose_build
2525

2626
def build_with_cmake(self, build_targets, build_type, build_args,
27-
prefer_just_built_toolchain=False):
27+
prefer_native_toolchain=False):
2828
assert self.toolchain.cmake is not None
2929
cmake_build = []
3030
_cmake = cmake.CMake(self.args, self.toolchain,
31-
prefer_just_built_toolchain)
31+
prefer_native_toolchain)
3232

3333
if self.toolchain.distcc_pump:
3434
cmake_build.append(self.toolchain.distcc_pump)

utils/swift_build_support/swift_build_support/products/minimalstdlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def build(self, host_target):
174174

175175
# Build!
176176
self.build_with_cmake(["swift-stdlib-freestanding"], build_variant, [],
177-
prefer_just_built_toolchain=True)
177+
prefer_native_toolchain=True)
178178

179179
def should_test(self, host_target):
180180
return False

utils/swift_build_support/swift_build_support/products/wasisysroot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def build(self, host_target):
194194
self.cmake_options.define('UNIX:BOOL', 'TRUE')
195195

196196
self.build_with_cmake([], self.args.build_variant, [],
197-
prefer_just_built_toolchain=True)
197+
prefer_native_toolchain=True)
198198
self.install_with_cmake(
199199
["install"], WASILibc.sysroot_install_path(build_root))
200200

utils/swift_build_support/swift_build_support/products/wasmstdlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def build(self, host_target):
117117

118118
# Configure with WebAssembly target variant, and build with just-built toolchain
119119
self.build_with_cmake([], self._build_variant, [],
120-
prefer_just_built_toolchain=True)
120+
prefer_native_toolchain=True)
121121

122122
def test(self, host_target):
123123
build_root = os.path.dirname(self.build_dir)

0 commit comments

Comments
 (0)