Skip to content

Commit b27b4d4

Browse files
committed
[CMake] Use proper module triples for the names of standard library modules.
The standard library (and other Swift modules built by our CMake build system) has been building module files with an architecture only (e.g., x86_64.swiftmodule) rather than a proper module triple (x86_86-apple-macosx10.15, x86_64-apple-ios13.0-simulator, etc.), unlike every other build system. There are hacks in the compiler and other tools to cope with this unnecessary build difference. Fix the module file names so we'll be able to remove the hacks later. Fixes rdar://problem/49071536.
1 parent f0df467 commit b27b4d4

File tree

9 files changed

+56
-46
lines changed

9 files changed

+56
-46
lines changed

cmake/modules/DarwinSDKs.cmake

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ is_sdk_requested(OSX swift_build_osx)
2020
if(swift_build_osx)
2121
configure_sdk_darwin(
2222
OSX "OS X" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX}"
23-
macosx macosx macosx "${SUPPORTED_OSX_ARCHS}")
23+
macosx macosx macosx macos "${SUPPORTED_OSX_ARCHS}")
2424
configure_target_variant(OSX-DA "OS X Debug+Asserts" OSX DA "Debug+Asserts")
2525
configure_target_variant(OSX-RA "OS X Release+Asserts" OSX RA "Release+Asserts")
2626
configure_target_variant(OSX-R "OS X Release" OSX R "Release")
@@ -33,7 +33,7 @@ is_sdk_requested(IOS swift_build_ios)
3333
if(swift_build_ios)
3434
configure_sdk_darwin(
3535
IOS "iOS" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS}"
36-
iphoneos ios ios "${SUPPORTED_IOS_ARCHS}")
36+
iphoneos ios ios ios "${SUPPORTED_IOS_ARCHS}")
3737
configure_target_variant(IOS-DA "iOS Debug+Asserts" IOS DA "Debug+Asserts")
3838
configure_target_variant(IOS-RA "iOS Release+Asserts" IOS RA "Release+Asserts")
3939
configure_target_variant(IOS-R "iOS Release" IOS R "Release")
@@ -43,7 +43,8 @@ is_sdk_requested(IOS_SIMULATOR swift_build_ios_simulator)
4343
if(swift_build_ios_simulator)
4444
configure_sdk_darwin(
4545
IOS_SIMULATOR "iOS Simulator" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS}"
46-
iphonesimulator ios-simulator ios "${SUPPORTED_IOS_SIMULATOR_ARCHS}")
46+
iphonesimulator ios-simulator ios ios-simulator
47+
"${SUPPORTED_IOS_SIMULATOR_ARCHS}")
4748
configure_target_variant(
4849
IOS_SIMULATOR-DA "iOS Debug+Asserts" IOS_SIMULATOR DA "Debug+Asserts")
4950
configure_target_variant(
@@ -56,7 +57,7 @@ is_sdk_requested(TVOS swift_build_tvos)
5657
if(swift_build_tvos)
5758
configure_sdk_darwin(
5859
TVOS "tvOS" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS}"
59-
appletvos tvos tvos "${SUPPORTED_TVOS_ARCHS}")
60+
appletvos tvos tvos tvos "${SUPPORTED_TVOS_ARCHS}")
6061
configure_target_variant(TVOS-DA "tvOS Debug+Asserts" TVOS DA "Debug+Asserts")
6162
configure_target_variant(TVOS-RA "tvOS Release+Asserts" TVOS RA "Release+Asserts")
6263
configure_target_variant(TVOS-R "tvOS Release" TVOS R "Release")
@@ -66,7 +67,8 @@ is_sdk_requested(TVOS_SIMULATOR swift_build_tvos_simulator)
6667
if(swift_build_tvos_simulator)
6768
configure_sdk_darwin(
6869
TVOS_SIMULATOR "tvOS Simulator" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS}"
69-
appletvsimulator tvos-simulator tvos "${SUPPORTED_TVOS_SIMULATOR_ARCHS}")
70+
appletvsimulator tvos-simulator tvos tvos-simulator
71+
"${SUPPORTED_TVOS_SIMULATOR_ARCHS}")
7072
configure_target_variant(
7173
TVOS_SIMULATOR-DA "tvOS Debug+Asserts" TVOS_SIMULATOR DA "Debug+Asserts")
7274
configure_target_variant(
@@ -79,7 +81,7 @@ is_sdk_requested(WATCHOS swift_build_watchos)
7981
if(swift_build_watchos)
8082
configure_sdk_darwin(
8183
WATCHOS "watchOS" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS}"
82-
watchos watchos watchos "${SUPPORTED_WATCHOS_ARCHS}")
84+
watchos watchos watchos watchos "${SUPPORTED_WATCHOS_ARCHS}")
8385
configure_target_variant(WATCHOS-DA "watchOS Debug+Asserts" WATCHOS DA "Debug+Asserts")
8486
configure_target_variant(WATCHOS-RA "watchOS Release+Asserts" WATCHOS RA "Release+Asserts")
8587
configure_target_variant(WATCHOS-R "watchOS Release" WATCHOS R "Release")
@@ -89,7 +91,8 @@ is_sdk_requested(WATCHOS_SIMULATOR swift_build_watchos_simulator)
8991
if(swift_build_watchos_simulator)
9092
configure_sdk_darwin(
9193
WATCHOS_SIMULATOR "watchOS Simulator" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS}"
92-
watchsimulator watchos-simulator watchos "${SUPPORTED_WATCHOS_SIMULATOR_ARCHS}")
94+
watchsimulator watchos-simulator watchos watchos-simulator
95+
"${SUPPORTED_WATCHOS_SIMULATOR_ARCHS}")
9396
configure_target_variant(WATCHOS_SIMULATOR-DA "watchOS Debug+Asserts" WATCHOS_SIMULATOR DA "Debug+Asserts")
9497
configure_target_variant(WATCHOS_SIMULATOR-RA "watchOS Release+Asserts" WATCHOS_SIMULATOR RA "Release+Asserts")
9598
configure_target_variant(WATCHOS_SIMULATOR-R "watchOS Release" WATCHOS_SIMULATOR R "Release")

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function(_report_sdk prefix)
3939
message(STATUS " Architectures: ${SWIFT_SDK_${prefix}_ARCHITECTURES}")
4040
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
4141
message(STATUS " ${arch} triple: ${SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE}")
42+
message(STATUS " Module triple: ${SWIFT_SDK_${prefix}_ARCH_${arch}_MODULE}")
4243
endforeach()
4344
if("${prefix}" STREQUAL "WINDOWS")
4445
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
@@ -115,9 +116,10 @@ endfunction()
115116
# SWIFT_SDK_${prefix}_ARCHITECTURES Architectures (as a list)
116117
# SWIFT_SDK_${prefix}_IS_SIMULATOR Whether this is a simulator target.
117118
# SWIFT_SDK_${prefix}_ARCH_${ARCH}_TRIPLE Triple name
119+
# SWIFT_SDK_${prefix}_ARCH_${ARCH}_MODULE Module triple name for this SDK
118120
macro(configure_sdk_darwin
119121
prefix name deployment_version xcrun_name
120-
version_min_name triple_name architectures)
122+
version_min_name triple_name module_name architectures)
121123
# Note: this has to be implemented as a macro because it sets global
122124
# variables.
123125

@@ -190,6 +192,9 @@ macro(configure_sdk_darwin
190192
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
191193
"${arch}-apple-${SWIFT_SDK_${prefix}_TRIPLE_NAME}")
192194

195+
set(SWIFT_SDK_${prefix}_ARCH_${arch}_MODULE
196+
"${arch}-apple-${module_name}")
197+
193198
# If this is a simulator target, append -simulator.
194199
if (SWIFT_SDK_${prefix}_IS_SIMULATOR)
195200
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
@@ -198,12 +203,8 @@ macro(configure_sdk_darwin
198203

199204
if(SWIFT_ENABLE_MACCATALYST AND "${prefix}" STREQUAL "OSX")
200205
# For macCatalyst append the '-macabi' environment to the target triple.
201-
set(SWIFT_SDK_MACCATALYST_ARCH_${arch}_TRIPLE
202-
"${SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE}-macabi")
203-
204-
# macCatalyst triple
205-
set(SWIFT_MACCATALYST_TRIPLE
206-
"x86_64-apple-ios${SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST}-macabi")
206+
set(SWIFT_SDK_MACCATALYST_ARCH_${arch}_TRIPLE "${arch}-apple-ios-macabi")
207+
set(SWIFT_SDK_MACCATALYST_ARCH_${arch}_MODULE "${arch}-apple-ios-macabi")
207208

208209
# For macCatalyst, the xcrun_name is "macosx" since it uses that sdk.
209210
# Hard code the library subdirectory to "maccatalyst" in that case.
@@ -256,6 +257,8 @@ macro(configure_sdk_unix name architectures)
256257
message(SEND_ERROR "Couldn't find SWIFT_SDK_ANDROID_ARCH_armv7_PATH")
257258
endif()
258259
set(SWIFT_SDK_ANDROID_ARCH_${arch}_TRIPLE "armv7-none-linux-androideabi")
260+
# The Android ABI isn't part of the module triple.
261+
set(SWIFT_SDK_ANDROID_ARCH_${arch}_MODULE "armv7-none-linux-android")
259262
elseif("${arch}" STREQUAL "aarch64")
260263
set(SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE "aarch64-linux-android")
261264
set(SWIFT_SDK_ANDROID_ARCH_${arch}_ALT_SPELLING "aarch64")
@@ -358,6 +361,11 @@ macro(configure_sdk_unix name architectures)
358361
message(FATAL_ERROR "unknown Unix OS: ${prefix}")
359362
endif()
360363
endif()
364+
365+
# If the module triple wasn't set explicitly, it's the same as the triple.
366+
if(NOT SWIFT_SDK_${prefix}_ARCH_${arch}_MODULE)
367+
set(SWIFT_SDK_${prefix}_ARCH_${arch}_MODULE "${SWIFT_SDK_${prefix}_ARCH_${arch}_MODULE}")
368+
endif()
361369
endforeach()
362370

363371
# Add this to the list of known SDKs.
@@ -388,6 +396,9 @@ macro(configure_sdk_windows name environment architectures)
388396
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
389397
"${arch}-unknown-windows-${environment}")
390398
endif()
399+
400+
set(SWIFT_SDK_${prefix}_ARCH_${arch}_MODULE "${SWIFT_SDK_${prefix}_ARCH_${arch}_MODULE}")
401+
391402
# NOTE: set the path to / to avoid a spurious `--sysroot` from being passed
392403
# to the driver -- rely on the `INCLUDE` AND `LIB` environment variables
393404
# instead.

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,11 @@ function(_compile_swift_files
464464
list(APPEND swift_flags "-parse-as-library")
465465

466466
set(module_base "${module_dir}/${SWIFTFILE_MODULE_NAME}")
467+
set(module_triple ${SWIFT_SDK_${SWIFTFILE_SDK}_ARCH_${SWIFTFILE_ARCHITECTURE}_MODULE})
467468
if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS OR
468469
SWIFTFILE_SDK STREQUAL "MACCATALYST")
469470
set(specific_module_dir "${module_base}.swiftmodule")
470-
set(module_base "${module_base}.swiftmodule/${SWIFTFILE_ARCHITECTURE}")
471+
set(module_base "${module_base}.swiftmodule/${module_triple}")
471472
else()
472473
set(specific_module_dir)
473474
endif()
@@ -530,12 +531,20 @@ function(_compile_swift_files
530531

531532
set(maccatalyst_specific_module_dir
532533
"${maccatalyst_module_dir}/${SWIFTFILE_MODULE_NAME}.swiftmodule")
533-
set(maccatalyst_module_base "${maccatalyst_specific_module_dir}/${SWIFTFILE_ARCHITECTURE}")
534+
set(maccatalyst_module_triple ${SWIFT_SDK_MACCATALYST_ARCH_${SWIFTFILE_ARCHITECTURE}_MODULE})
535+
set(maccatalyst_module_base "${maccatalyst_specific_module_dir}/${maccatalyst_module_triple}")
534536
set(maccatalyst_module_file "${maccatalyst_module_base}.swiftmodule")
535537
set(maccatalyst_module_doc_file "${maccatalyst_module_base}.swiftdoc")
536538

537539
set(maccatalyst_module_outputs "${maccatalyst_module_file}" "${maccatalyst_module_doc_file}")
538540

541+
if(SWIFT_ENABLE_MODULE_INTERFACES)
542+
set(maccatalyst_interface_file "${maccatalyst_module_base}.swiftinterface")
543+
list(APPEND maccatalyst_module_outputs "${maccatalyst_interface_file}")
544+
else()
545+
set(maccatalyst_interface_file)
546+
endif()
547+
539548
swift_install_in_component(DIRECTORY ${maccatalyst_specific_module_dir}
540549
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${maccatalyst_library_subdir}"
541550
COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT}"
@@ -611,6 +620,12 @@ function(_compile_swift_files
611620
list(APPEND maccatalyst_swift_flags
612621
"-I" "${SWIFTLIB_DIR}/${maccatalyst_library_subdir}")
613622
set(maccatalyst_swift_module_flags ${swift_module_flags})
623+
list(FIND maccatalyst_swift_module_flags "${interface_file}" interface_file_index)
624+
if(NOT interface_file_index EQUAL -1)
625+
list(INSERT maccatalyst_swift_module_flags ${interface_file_index} "${maccatalyst_interface_file}")
626+
math(EXPR old_interface_file_index "${interface_file_index} + 1")
627+
list(REMOVE_AT maccatalyst_swift_module_flags ${old_interface_file_index})
628+
endif()
614629
elseif(maccatalyst_build_flavor STREQUAL "ios-like")
615630
compute_library_subdir(maccatalyst_library_subdir
616631
"MACCATALYST" "${SWIFTFILE_ARCHITECTURE}")

test/ModuleInterface/ModuleCache/force-module-loading-mode-archs.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// 2. Only interface is present.
1212
// RUN: %empty-directory(%t/Lib.swiftmodule)
13-
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.swiftmodule/%target-cpu.swiftinterface
13+
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.swiftmodule/%module-target-triple.swiftinterface
1414
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-parseable not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -I %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
1515
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-serialized not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -I %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
1616
// RUN: env SWIFT_FORCE_MODULE_LOADING=only-parseable not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -I %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
@@ -34,7 +34,7 @@
3434
// RUN: %empty-directory(%t/MCP)
3535

3636
// 4. Both are present.
37-
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.swiftmodule/%target-cpu.swiftinterface
37+
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.swiftmodule/%module-target-triple.swiftinterface
3838
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-parseable not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -I %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
3939
// RUN: %empty-directory(%t/MCP)
4040
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-serialized not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -I %t 2>&1 | %FileCheck -check-prefix=FROM-SERIALIZED %s

test/ModuleInterface/ModuleCache/force-module-loading-mode-framework.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// 2. Only interface is present.
1212
// RUN: %empty-directory(%t/Lib.framework/Modules/Lib.swiftmodule)
13-
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftinterface
13+
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.framework/Modules/Lib.swiftmodule/%module-target-triple.swiftinterface
1414
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-parseable not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -F %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
1515
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-serialized not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -F %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
1616
// RUN: env SWIFT_FORCE_MODULE_LOADING=only-parseable not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -F %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
@@ -29,7 +29,7 @@
2929
// RUN: not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP -F %t %s 2>&1 | %FileCheck -check-prefix=FROM-SERIALIZED %s
3030

3131
// 4. Both are present.
32-
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftinterface
32+
// RUN: cp %S/Inputs/force-module-loading-mode/Lib.swiftinterface %t/Lib.framework/Modules/Lib.swiftmodule/%module-target-triple.swiftinterface
3333
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-parseable not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -F %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
3434
// RUN: %empty-directory(%t/MCP)
3535
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-serialized not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -F %t 2>&1 | %FileCheck -check-prefix=FROM-SERIALIZED %s

test/ModuleInterface/ModuleCache/swiftdoc-next-to-swiftinterface.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Try again with architecture-specific subdirectories.
1111
// RUN: %empty-directory(%t)
1212
// RUN: %empty-directory(%t/Lib.swiftmodule)
13-
// RUN: %target-swift-frontend -emit-module -emit-module-interface-path %t/Lib.swiftmodule/%target-cpu.swiftinterface -emit-module-doc -parse-stdlib -o %t/Lib.swiftmodule/%target-swiftmodule-name -module-name Lib %s
13+
// RUN: %target-swift-frontend -emit-module -emit-module-interface-path %t/Lib.swiftmodule/%module-target-triple.swiftinterface -emit-module-doc -parse-stdlib -o %t/Lib.swiftmodule/%target-swiftmodule-name -module-name Lib %s
1414
// RUN: %target-swift-ide-test -print-module -module-to-print=Lib -access-filter-public -I %t -source-filename=x -prefer-type-repr=false -fully-qualified-types=true > %t/from-module.txt
1515
// RUN: %FileCheck %s < %t/from-module.txt
1616

test/lit.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,9 +1791,9 @@ if run_vendor != 'apple':
17911791
extra_frameworks_dir = ''
17921792
config.substitutions.append(('%xcode-extra-frameworks-dir', extra_frameworks_dir))
17931793

1794-
config.substitutions.append(('%target-swiftmodule-name', run_cpu + '.swiftmodule'))
1795-
config.substitutions.append(('%target-swiftdoc-name', run_cpu + '.swiftdoc'))
1796-
config.substitutions.append(('%target-swiftsourceinfo-name', run_cpu + '.swiftsourceinfo'))
1794+
config.substitutions.append(('%target-swiftmodule-name', target_specific_module_triple + '.swiftmodule'))
1795+
config.substitutions.append(('%target-swiftdoc-name', target_specific_module_triple + '.swiftdoc'))
1796+
config.substitutions.append(('%target-swiftsourceinfo-name', target_specific_module_triple + '.swiftsourceinfo'))
17971797

17981798
config.substitutions.append(('%target-object-format', config.target_object_format))
17991799
config.substitutions.append(('%{target-shared-library-prefix}', config.target_shared_library_prefix))

utils/swift_build_sdk_interfaces.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -240,30 +240,11 @@ def log_output_to_file(content, module_name, interface_base, label, log_path):
240240
def looks_like_iosmac(interface_base):
241241
return 'ios-macabi' in interface_base
242242

243-
244-
def rename_interface_for_iosmac_if_needed(interface_base, module_path):
245-
"""Hack: Both macOS and iOSMac use 'x86_64' as the short name for a module
246-
interface file, and while we want to move away from this it's something we
247-
need to handle in the short term. Manually rename these to the full form of
248-
the target-specific module when we're obviously on macOS or iOSMac.
249-
"""
250-
if interface_base != 'x86_64':
251-
return interface_base
252-
if '/iOSSupport/' in module_path:
253-
return 'x86_64-apple-ios-macabi'
254-
if '/MacOS' in module_path:
255-
return 'x86_64-apple-macos'
256-
return interface_base
257-
258-
259243
def process_module(module_file):
260244
global args, shared_output_lock
261245
try:
262246
interface_base, _ = \
263247
os.path.splitext(os.path.basename(module_file.path))
264-
interface_base = \
265-
rename_interface_for_iosmac_if_needed(interface_base,
266-
module_file.path)
267248

268249
swiftc = os.getenv('SWIFT_EXEC',
269250
os.path.join(os.path.dirname(__file__), 'swiftc'))

validation-test/ParseableInterface/verify_all_overlays.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# generated.
55

66
# RUN: %empty-directory(%t)
7-
# RUN: %{python} %s %target-os %target-cpu %platform-sdk-overlay-dir %t \
7+
# RUN: %{python} %s %target-os %module-target-triple %platform-sdk-overlay-dir %t \
88
# RUN: %target-swift-frontend -build-module-from-parseable-interface \
99
# RUN: -Fsystem %sdk/System/Library/PrivateFrameworks/ \
1010
# RUN: | sort > %t/failures.txt
@@ -30,7 +30,7 @@
3030
import sys
3131

3232
target_os = sys.argv[1]
33-
target_cpu = sys.argv[2]
33+
target_module_triple = sys.argv[2]
3434
sdk_overlay_dir = sys.argv[3]
3535
output_dir = sys.argv[4]
3636
compiler_invocation = sys.argv[5:]
@@ -43,7 +43,7 @@
4343
module_path = os.path.join(sdk_overlay_dir, filename)
4444
if os.path.isdir(module_path):
4545
interface_file = os.path.join(module_path,
46-
target_cpu + ".swiftinterface")
46+
target_module_triple + ".swiftinterface")
4747
else:
4848
continue
4949
else:

0 commit comments

Comments
 (0)