|
62 | 62 | # This defines an _enum_ to identify an imported XCFramework bundle type. |
63 | 63 | _BUNDLE_TYPE = struct(frameworks = 1, libraries = 2) |
64 | 64 |
|
65 | | -# The name of the execution group that houses the Swift toolchain and is used to |
66 | | -# run Swift actions. |
67 | | -_SWIFT_EXEC_GROUP = "swift" |
68 | | - |
69 | 65 | def _classify_xcframework_imports(config_vars, xcframework_imports): |
70 | 66 | """Classifies XCFramework files for later processing. |
71 | 67 |
|
@@ -566,7 +562,7 @@ def _apple_dynamic_xcframework_import_impl(ctx): |
566 | 562 |
|
567 | 563 | if "apple._import_framework_via_swiftinterface" in features and xcframework_library.swift_module_interface: |
568 | 564 | # Create SwiftInfo provider |
569 | | - swift_toolchain = swift_common.get_toolchain(ctx, exec_group = _SWIFT_EXEC_GROUP) |
| 565 | + swift_toolchain = swift_common.get_toolchain(ctx) |
570 | 566 | providers.append( |
571 | 567 | framework_import_support.swift_info_from_module_interface( |
572 | 568 | actions = actions, |
@@ -643,7 +639,7 @@ def _apple_static_xcframework_import_impl(ctx): |
643 | 639 | if xcframework.files_by_category.swift_interface_imports or \ |
644 | 640 | xcframework.files_by_category.swift_module_imports or \ |
645 | 641 | has_swift: |
646 | | - swift_toolchain = swift_common.get_toolchain(ctx, exec_group = _SWIFT_EXEC_GROUP) |
| 642 | + swift_toolchain = swift_common.get_toolchain(ctx) |
647 | 643 | providers.append(SwiftUsageInfo()) |
648 | 644 |
|
649 | 645 | # The Swift toolchain propagates Swift-specific linker flags (e.g., |
@@ -700,7 +696,7 @@ def _apple_static_xcframework_import_impl(ctx): |
700 | 696 |
|
701 | 697 | if "apple._import_framework_via_swiftinterface" in features and xcframework_library.swift_module_interface: |
702 | 698 | # Create SwiftInfo provider |
703 | | - swift_toolchain = swift_common.get_toolchain(ctx, exec_group = _SWIFT_EXEC_GROUP) |
| 699 | + swift_toolchain = swift_common.get_toolchain(ctx) |
704 | 700 | providers.append( |
705 | 701 | framework_import_support.swift_info_from_module_interface( |
706 | 702 | actions = actions, |
@@ -795,18 +791,13 @@ Unnecssary and ignored, will be removed in the future. |
795 | 791 | ), |
796 | 792 | }, |
797 | 793 | ), |
798 | | - exec_groups = { |
799 | | - _SWIFT_EXEC_GROUP: exec_group( |
800 | | - toolchains = swift_common.use_toolchain(), |
801 | | - ), |
802 | | - }, |
803 | 794 | fragments = ["apple", "cpp"], |
804 | 795 | provides = [ |
805 | 796 | AppleFrameworkImportInfo, |
806 | 797 | CcInfo, |
807 | 798 | AppleDynamicFrameworkInfo, |
808 | 799 | ], |
809 | | - toolchains = use_cpp_toolchain(), |
| 800 | + toolchains = swift_common.use_toolchain() + use_cpp_toolchain(), |
810 | 801 | ) |
811 | 802 |
|
812 | 803 | apple_static_xcframework_import = rule( |
@@ -935,11 +926,6 @@ Unnecssary and ignored, will be removed in the future. |
935 | 926 | ), |
936 | 927 | }, |
937 | 928 | ), |
938 | | - exec_groups = { |
939 | | - _SWIFT_EXEC_GROUP: exec_group( |
940 | | - toolchains = swift_common.use_toolchain(), |
941 | | - ), |
942 | | - }, |
943 | 929 | fragments = ["apple", "cpp", "objc"], |
944 | | - toolchains = use_cpp_toolchain(), |
| 930 | + toolchains = swift_common.use_toolchain() + use_cpp_toolchain(), |
945 | 931 | ) |
0 commit comments