Skip to content

Commit 99dedee

Browse files
committed
swift_build_support: renamegenerate_toolchain_file
1 parent ba2d625 commit 99dedee

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

utils/swift_build_support/swift_build_support/products/cmark.py

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

5555
self.cmake_options.define('CMARK_THREADING', 'ON')
5656

57-
host_toolchain = self.generate_toolchain_file(host_target)
57+
host_toolchain = self.generate_toolchain_file_for_darwin_or_linux(host_target)
5858

5959
(platform, _) = host_target.split('-')
6060
if not host_toolchain and platform == "openbsd":

utils/swift_build_support/swift_build_support/products/curl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def build(self, host_target):
109109
self.cmake_options.define('ENABLE_UNIX_SOCKETS', 'NO')
110110
self.cmake_options.define('ENABLE_THREADED_RESOLVER', 'NO')
111111

112-
self.generate_toolchain_file(host_target)
112+
self.generate_toolchain_file_for_darwin_or_linux(host_target)
113113

114114
if self.args.build_zlib:
115115
# If we're building zlib, make cmake search in the built toolchain

utils/swift_build_support/swift_build_support/products/earlyswiftsyntax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def build(self, host_target):
5151
self.args.swift_build_variant)
5252
self.cmake_options.define('BUILD_SHARED_LIBS:STRING', 'NO')
5353

54-
self.generate_toolchain_file(host_target)
54+
self.generate_toolchain_file_for_darwin_or_linux(host_target)
5555

5656
self.build_with_cmake(["all"], self.args.swift_build_variant, [])
5757

utils/swift_build_support/swift_build_support/products/libxml2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ def build(self, host_target):
8585
self.cmake_options.define('LIBXML2_WITH_TESTS', 'NO')
8686
self.cmake_options.define('LIBXML2_WITH_ZLIB', 'NO')
8787

88-
self.generate_toolchain_file(host_target)
88+
self.generate_toolchain_file_for_darwin_or_linux(host_target)
8989
self.build_with_cmake(["LibXml2"], self.args.libxml2_build_variant, [])

utils/swift_build_support/swift_build_support/products/product.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,16 @@ def generate_linux_toolchain_file(self, platform, arch):
411411

412412
return toolchain_file
413413

414-
def generate_toolchain_file(self, host_target):
414+
def generate_toolchain_file_for_darwin_or_linux(self, host_target):
415415
"""
416416
Checks `host_target` platform and generates a new CMake tolchain file
417-
appropriate for that target plaftorm. Defines `CMAKE_C_FLAGS` and
418-
`CMAKE_CXX_FLAGS` as CMake options. Also defines `CMAKE_TOOLCHAIN_FILE`
419-
with the path of the generated toolchain file as a CMake option.
417+
appropriate for that target plaftorm (either Darwin or Linux). Defines
418+
`CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` as CMake options. Also defines
419+
`CMAKE_TOOLCHAIN_FILE` with the path of the generated toolchain file
420+
as a CMake option.
420421
421-
Returns: path to the newly generated toolchain file on the filesystem.
422+
Returns: path to the newly generated toolchain file on the
423+
filesystem.
422424
"""
423425

424426
(platform, arch) = host_target.split('-')

utils/swift_build_support/swift_build_support/products/zlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ def build(self, host_target):
8181
self.cmake_options.define('SKIP_INSTALL_FILES', 'YES')
8282
self.cmake_options.define('CMAKE_INSTALL_PREFIX', '/usr')
8383

84-
self.generate_toolchain_file(host_target)
84+
self.generate_toolchain_file_for_darwin_or_linux(host_target)
8585
self.build_with_cmake(["all"], self.args.zlib_build_variant, [])

0 commit comments

Comments
 (0)