Skip to content

Commit

Permalink
[registrar] Fix registration of stub Objective-C classes. Fixes #21546.
Browse files Browse the repository at this point in the history
TODO:

* Clean up PR.
* Improve description.

Fixes #21546.
  • Loading branch information
rolfbjarne committed Nov 7, 2024
1 parent 2e9273a commit 7dba6e3
Show file tree
Hide file tree
Showing 30 changed files with 919 additions and 136 deletions.
15 changes: 15 additions & 0 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,14 @@ DOTNET_PLATFORMS+=iOS
DOTNET_MONOVM_PLATFORMS+=iOS
DOTNET_IOS_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=iOS
XCFRAMEWORK_PLATFORMS+=iossimulator
XCFRAMEWORK_iossimulator_RUNTIME_IDENTIFIERS=iossimulator-x64 iossimulator-arm64

# 64-bit architectures
ifdef INCLUDE_DEVICE
DOTNET_IOS_RUNTIME_IDENTIFIERS_64=ios-arm64
XCFRAMEWORK_PLATFORMS+=ios
XCFRAMEWORK_ios_RUNTIME_IDENTIFIERS=ios-arm64
endif # INCLUDE_DEVICE
DOTNET_IOS_RUNTIME_IDENTIFIERS_64+=iossimulator-x64 iossimulator-arm64

Expand All @@ -721,8 +725,13 @@ DOTNET_PLATFORMS+=tvOS
DOTNET_MONOVM_PLATFORMS+=tvOS
DOTNET_TVOS_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=tvOS
XCFRAMEWORK_PLATFORMS+=tvossimulator
XCFRAMEWORK_tvossimulator_RUNTIME_IDENTIFIERS=tvossimulator-x64 tvossimulator-arm64

ifdef INCLUDE_DEVICE
DOTNET_TVOS_RUNTIME_IDENTIFIERS=tvos-arm64 tvossimulator-x64 tvossimulator-arm64
XCFRAMEWORK_PLATFORMS+=tvos
XCFRAMEWORK_tvos_RUNTIME_IDENTIFIERS=tvos-arm64
else
DOTNET_TVOS_RUNTIME_IDENTIFIERS=tvossimulator-x64 tvossimulator-arm64
endif
Expand All @@ -736,6 +745,9 @@ DOTNET_MACCATALYST_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=MacCatalyst
DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS=maccatalyst-x64 maccatalyst-arm64
DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS_64+=$(DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS)
XCFRAMEWORK_PLATFORMS+=maccatalyst
XCFRAMEWORK_DESKTOP_PLATFORMS+=maccatalyst
XCFRAMEWORK_maccatalyst_RUNTIME_IDENTIFIERS=$(DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS)
endif

ifdef INCLUDE_MAC
Expand All @@ -745,6 +757,9 @@ DOTNET_MACOS_BITNESSES+=64
DOTNET_NATIVEAOT_PLATFORMS+=macOS
DOTNET_MACOS_RUNTIME_IDENTIFIERS=osx-x64 osx-arm64
DOTNET_MACOS_RUNTIME_IDENTIFIERS_64=$(DOTNET_MACOS_RUNTIME_IDENTIFIERS)
XCFRAMEWORK_PLATFORMS+=macos
XCFRAMEWORK_DESKTOP_PLATFORMS+=macos
XCFRAMEWORK_osx_RUNTIME_IDENTIFIERS=$(DOTNET_MACOS_RUNTIME_IDENTIFIERS)
endif

ifdef INCLUDE_IOS
Expand Down
132 changes: 60 additions & 72 deletions mk/rules.mk

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions src/Foundation/RegisterAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,22 @@ public bool IsWrapper {
}

public bool SkipRegistration { get; set; }

/// <summary>
/// Specifies whether the Objective-C class is a stub class.
/// Objective-C stub classes are sometimes used when bridging Swift to Objective-C.
/// </summary>
/// <remarks>
/// <para>Stub classes can be identified because they include SWIFT_RESILIENT_CLASS in the generated Objective-C header.</para>
/// <para>Example Objective-C type declaration:</para>
/// <example>
/// <code lang="objective-c"><![CDATA[
/// SWIFT_RESILIENT_CLASS("_TtC16MySwiftFramework11MySwiftType")
/// @interface MySwiftType : SwiftTypeFromDifferentSwiftFramework
/// @end
/// ]]></code>
/// </example>
/// </remarks>
public bool IsStubClass { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/bgen/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public BaseTypeAttribute (Type t)
// too many objects, but two cases in particular that users keep
// trampling on: UIAlertView and UIActionSheet
public string KeepRefUntil { get; set; }

public bool IsStubClass { get; set; }
}

//
Expand Down
2 changes: 1 addition & 1 deletion src/bgen/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5737,7 +5737,7 @@ public void Generate (Type type)
is_direct_binding = false;
is_direct_binding_value = "false";
}
print ("[Register(\"{0}\", {1})]", register_name, is_direct_binding == false ? "false" : "true");
print ($"[Register(\"{register_name}\", {(is_direct_binding == false ? "false" : "true")}{(bta.IsStubClass ? ", IsStubClass = true" : string.Empty)})]");
}
if (is_abstract || need_abstract.ContainsKey (type)) {
// Don't mark [Abstract] classes as abstract in .NET, we might need to create instances of them at some point.
Expand Down
8 changes: 6 additions & 2 deletions tests/bindings-test/ApiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ interface ProtocolWithBlockProperties {
}
interface IProtocolWithBlockProperties { }

#if NET
[BaseType (typeof (NSObject))]
interface SwiftTestClass {
[Export ("SayHello")]
Expand All @@ -508,5 +507,10 @@ interface SwiftTestClass {
// provide an actual argument when calling the method.
void DoSomethingComplexAsync (string message, IntPtr complexParameter, Action<NSString> completionHandler);
}
#endif

[BaseType (typeof (SwiftTestClass), IsStubClass = true)]
interface SwiftTestClass2 {
[Export ("SayHello2")]
string SayHello2 ();
}
}
10 changes: 8 additions & 2 deletions tests/bindings-test/RuntimeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ public override void AssertMainThreadBlockReleaseCallback (InnerBlock completion
}
}

#if NET
[Test]
public void SwiftTest ()
{
Expand Down Expand Up @@ -125,6 +124,13 @@ public void SwiftTypeEncodings ()
Assert.AreEqual ("fish", asyncResult, "DoSomethingComplexAsync");
Assert.IsTrue (done, "Done 2");
}
#endif

[Test]
public void SwiftTestClass2 ()
{
TestRuntime.AssertXcodeVersion (13, 0);
using var obj = new SwiftTestClass2 ();
Assert.AreEqual ("Hello from Swift 2", obj.SayHello (), "Hello");
}
}
}
5 changes: 5 additions & 0 deletions tests/bindings-test/dotnet/shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
<Kind>Framework</Kind>
<LinkWithSwiftSystemLibraries>true</LinkWithSwiftSystemLibraries>
</NativeReference>

<NativeReference Include="$(TestLibrariesDirectory)\.libs\SwiftTest2.xcframework">
<Kind>Framework</Kind>
<LinkWithSwiftSystemLibraries>true</LinkWithSwiftSystemLibraries>
</NativeReference>
</ItemGroup>

<ItemGroup>
Expand Down
178 changes: 140 additions & 38 deletions tests/test-libraries/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ $(GENERATED_FILES_PATTERN): $(TESTGENERATOR)
libtest-object.m libtest-ar.m:
$(Q) ln -fhs libtest.m $@

MACOS_INFO_PLIST_INFIX=/Versions/A/Resources
MACOS_BINARY_INFIX=/Versions/A
MACCATALYST_INFO_PLIST_INFIX=/Versions/A/Resources
MACCATALYST_BINARY_INFIX=/Versions/A
define DefineInfixes
$(1)_INFO_PLIST_INFIX=/Versions/A/Resources
$(1)_BINARY_INFIX=/Versions/A
endef
$(foreach platform,$(DOTNET_DESKTOP_PLATFORMS),$(foreach rid,$(DOTNET_$(shell echo $(platform)| tr 'a-z' 'A-Z')_RUNTIME_IDENTIFIERS),$(eval $(call DefineInfixes,$(rid)))))
$(foreach platform,$(DOTNET_DESKTOP_PLATFORMS),$(eval $(call DefineInfixes,$(shell echo $(platform) | tr 'A-Z' 'a-z'))))
$(foreach platform,$(DOTNET_DESKTOP_PLATFORMS),$(eval $(call DefineInfixes,$(shell echo $(platform) | tr 'a-z' 'A-Z'))))

define SymlinksTemplate

Expand Down Expand Up @@ -72,11 +75,9 @@ x::
endef
ifdef INCLUDE_MAC
$(eval $(call SymlinksTemplate,macos,MACOS,XTest,XTEST))
$(eval $(call SymlinksTemplate,macos,MACOS,SwiftTest,SWIFTTEST))
endif
ifdef INCLUDE_MACCATALYST
$(eval $(call SymlinksTemplate,maccatalyst,MACCATALYST,XTest,XTEST))
$(eval $(call SymlinksTemplate,maccatalyst,MACCATALYST,SwiftTest,SWIFTTEST))
endif

define Template
Expand All @@ -91,13 +92,8 @@ $(1)_XSTATICARTEST_TARGETS += \
$(1)_XSTATICOBJECTTEST_TARGETS += \
.libs/$(1)/XStaticObjectTest.framework/XStaticObjectTest \

$(1)_SWIFTTEST_TARGETS += \
.libs/$(1)/SwiftTest.framework$($(2)_BINARY_INFIX)/SwiftTest \
.libs/$(1)/SwiftTest.framework$($(2)_INFO_PLIST_INFIX)/Info.plist \

$(2)_TARGETS = \
$$($(1)_XTEST_TARGETS) \
$$($(1)_SWIFTTEST_TARGETS) \
.libs/$(1)/XStaticObjectTest.framework/XStaticObjectTest \
.libs/$(1)/XStaticArTest.framework/XStaticArTest \
.libs/$(1)/libtest.dylib \
Expand All @@ -112,8 +108,6 @@ $(2)_TARGETS = \
.libs/$(1)/XTest.framework.stamp \
.libs/$(1)/XStaticArTest.framework.stamp \
.libs/$(1)/XStaticObjectTest.framework.stamp \
.libs/$(1)/SwiftTest.framework \
.libs/$(1)/SwiftTest.framework.stamp \

all-local:: $$($(2)_TARGETS) $(GENERATED_FILES)

Expand All @@ -126,9 +120,6 @@ all-local:: $$($(2)_TARGETS) $(GENERATED_FILES)
.libs/$(1)/XStaticObjectTest.framework.stamp: $$($(1)_XSTATICOBJECTTEST_TARGETS)
$$(Q) touch $$@

.libs/$(1)/SwiftTest.framework.stamp: $$($(1)_SWIFTTEST_TARGETS)
$$(Q) touch $$@

clean-$(1):
rm -Rf .libs/$(1)

Expand Down Expand Up @@ -174,17 +165,6 @@ COMMON_DYLIB_ARGS=-g -dynamiclib -gdwarf-2 -fms-extensions libframework.m -o $$@
.libs/$(1)/libtest.dylib: $$(foreach arch,$(3),.libs/$(1)/libtest.$$(arch).dylib)
$$(call Q_2,LIPO [$(1)]) $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo $$^ -create -output $$@

.libs/$(1)/libSwiftTest.dylib: $$(foreach arch,$(3),.libs/$(1)/libSwiftTest.$$(arch).dylib)
$$(call Q_2,LIPO [$(1)]) $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo $$^ -create -output $$@

# SwiftTest is a framework where the binary code is a (fat) dynamic library
.libs/$(1)/SwiftTest.framework$($(2)_BINARY_INFIX)/SwiftTest: .libs/$(1)/libSwiftTest.dylib | .libs/$(1)/SwiftTest.framework$($(2)_BINARY_INFIX)
$$(Q) $(CP) $$^ $$@
$$(Q) $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool -id @rpath/SwiftTest.framework/SwiftTest $$@

.libs/$(1)/SwiftTest.framework$($(2)_INFO_PLIST_INFIX)/Info.plist: SwiftTest-Info-$(1).plist | .libs/$(1)/SwiftTest.framework$($(2)_INFO_PLIST_INFIX)
$$(Q) $(CP) $$^ $$@

# XTest is a framework where the binary code is a (fat) dynamic library
.libs/$(1)/XTest.framework$($(2)_BINARY_INFIX)/XTest: .libs/$(1)/libtest.dylib | .libs/$(1)/XTest.framework$($(2)_BINARY_INFIX)
$$(Q) $(CP) $$^ $$@
Expand All @@ -206,10 +186,8 @@ COMMON_DYLIB_ARGS=-g -dynamiclib -gdwarf-2 -fms-extensions libframework.m -o $$@
$(1)_DIRECTORIES = \
.libs/$(1)/XTest.framework \
.libs/$(1)/XTest.framework/Versions \
.libs/$(1)/SwiftTest.framework/Versions \
.libs/$(1)/XStaticObjectTest.framework \
.libs/$(1)/XStaticArTest.framework \
.libs/$(1)/SwiftTest.framework \

$$($(1)_DIRECTORIES):
$$(Q) mkdir -p $$@
Expand Down Expand Up @@ -238,6 +216,129 @@ ifdef INCLUDE_MACCATALYST
$(eval $(call Template,maccatalyst,MACCATALYST,x86_64 arm64,MacCatalyst,$(MACCATALYST_COMMON_CFLAGS)))
endif

#
# Swift libraries and frameworks
#

EXTRA_libSwiftTest_FLAGS=-enable-library-evolution -emit-objc-header
EXTRA_libSwiftTest2_FLAGS=-lSwiftTest

# SwiftTest is a framework where the binary code is a (fat) dynamic library
# SwiftTest2 is a framework where the binary code is a (fat) dynamic library, and which depends on SwiftTest.
SWIFT_TESTS+=SwiftTest
SWIFT_TESTS+=SwiftTest2

define SwiftTestsPerRid
SWIFT_$(1)_$(2)_TARGETS += \
.libs/$(1)/$(2).framework$($(1)_BINARY_INFIX)/$(2) \
.libs/$(1)/$(2).framework$($(1)_INFO_PLIST_INFIX)/Info.plist \

SWIFT_$(1)_TARGETS = \
$$(SWIFT_$(1)_$(2)_TARGETS) \
$$(SWIFT_$(1)_$(2)_TARGETS) \
.libs/$(1)/$(2).framework \
.libs/$(1)/$(2).framework.stamp \

.libs/$(1)/$(2).framework.stamp: $$(SWIFT_$(1)_$(2)_TARGETS)
$$(Q) touch $$@

.libs/$(1)/$(2).framework$($(1)_BINARY_INFIX)/$(2): .libs/$(1)/lib$(2).dylib | .libs/$(1)/$(2).framework$($(1)_BINARY_INFIX)
$$(Q) $(CP) $$^ $$@
$$(Q) $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool -id @rpath/$(2).framework/$(2) $$@

.libs/$(1)/$(2).framework$($(1)_INFO_PLIST_INFIX)/Info.plist: plists/$(2)-Info-$(1).plist | .libs/$(1)/$(2).framework$($(1)_INFO_PLIST_INFIX)
$$(Q) $(CP) $$^ $$@

SWIFT_$(1)_DIRECTORIES = \
.libs/$(1)/$(2).framework/Versions \
.libs/$(1)/$(2).framework \

$$(SWIFT_$(1)_DIRECTORIES):
$$(Q) mkdir -p $$@

all-local:: $$(SWIFT_$(1)_TARGETS)
swift:: $$(SWIFT_$(1)_TARGETS)
endef
$(foreach swiftTest,$(SWIFT_TESTS),$(foreach rid,$(DOTNET_RUNTIME_IDENTIFIERS),$(eval $(call SwiftTestsPerRid,$(rid),$(swiftTest)))))

# Make sure libSwiftTest is built before libSwiftTest2, because libSwiftTest2 depends on libSwiftTest
define SwiftTest2AddDependency
.libs/$(1)/libSwiftTest2.dylib: .libs/$(1)/libSwiftTest.dylib
endef
$(foreach rid,$(DOTNET_RUNTIME_IDENTIFIERS),$(eval $(call SwiftTest2AddDependency,$(rid))))

define SwiftTestsPerPlatform
.libs/$(1)/$(3).dylib: $$(foreach rid,$(2),.libs/$(1)/$(3).dylib) | .libs/$(1)
$$(call Q_2,LIPO [$(1)]) $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo $$^ -create -output $$@
endef
$(foreach swiftTest,$(SWIFT_TESTS),$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call SwiftTestsPerPlatform,$(platform),$(DOTNET_$(shell echo $(platform) | tr 'a-z' 'A-Z')_RUNTIME_IDENTIFIERS),$(swiftTest)))))

define SwiftSymlinksTemplate
SWIFT_SYMLINK_$(1)_TARGETS += \
.libs/$(1)/$(2).framework/$(2) \
.libs/$(1)/$(2).framework/Resources \
.libs/$(1)/$(2).framework/Versions/Current \
.libs/$(1)/$(2).framework/Versions/A/Resources/Info.plist \

.libs/$(1)/$(2).framework$($(1)_BINARY_INFIX) .libs/$(1)/$(2).framework$($(1)_INFO_PLIST_INFIX):
$$(Q) mkdir -p $$@

.libs/$(1)/$(2).framework/$(3): | .libs/$(1)/$(2).framework
$$(Q) ln -fs Versions/A/$(2) $$@

.libs/$(1)/$(2).framework/Resources: | .libs/$(1)/$(2).framework
$$(Q) ln -fs Versions/Current/Resources $$@

.libs/$(1)/$(2).framework/Versions/Current: | .libs/$(1)/$(2).framework/Versions
$$(Q) ln -fs A $$@

all-locals:: $$(SWIFT_SYMLINK_$(1)_TARGETS)
swift:: $$(SWIFT_SYMLINK_$(1)_TARGETS)
endef
$(foreach swiftTest,$(SWIFT_TESTS),$(foreach platform,$(DOTNET_DESKTOP_PLATFORMS),$(foreach rid,$(DOTNET_$(shell echo $(platform) | tr 'a-z' 'A-Z')_RUNTIME_IDENTIFIERS),$(eval $(call SwiftSymlinksTemplate,$(rid),$(swiftTest))))))

define PlatformFrameworkTemplate
.libs/$(2)/$(1).framework$($(2)_BINARY_INFIX)/$(1): $$(foreach rid,$(3),.libs/$$(rid)/$(1).framework$($(2)_BINARY_INFIX)/$(1))
$$(Q) mkdir -p $$(dir $$@)
$$(Q) lipo -create -output "$$@" $$^

.libs/$(2)/$(1).framework$($(2)_INFO_PLIST_INFIX)/Info.plist: $$(foreach rid,$(3),.libs/$$(rid)/$(1).framework$($(2)_BINARY_INFIX)/Info.plist)
$$(Q) mkdir -p $$(dir $$@)
@# Check if the Info.plists are identical (if there are more than one)
$$(Q) test "$$(words $$^)" -eq 1 || diff $$^
@# Copy one of them
$$(Q) $(CP) $$< $$@

PLATFORM_FRAMEWORK_TEMPLATE_$(2)_TARGETS += \
.libs/$(2)/$(1).framework$($(2)_BINARY_INFIX)/$(1) \
.libs/$(2)/$(1).framework$($(2)_INFO_PLIST_INFIX)/Info.plist \

all-local:: $$(PLATFORM_FRAMEWORK_TEMPLATE_$(2)_TARGETS)
endef
$(foreach swiftTest,$(SWIFT_TESTS),$(foreach xcframeworkPlatform,$(XCFRAMEWORK_PLATFORMS),$(eval $(call PlatformFrameworkTemplate,$(swiftTest),$(xcframeworkPlatform),$(XCFRAMEWORK_$(xcframeworkPlatform)_RUNTIME_IDENTIFIERS)))))

define PlatformFrameworkSymlinksTemplate
.libs/$(1)/$(2).framework/$(2):
$$(Q) mkdir -p $$(dir $$@)
$$(Q) ln -fs Versions/A/$(2) $$@

.libs/$(1)/$(2).framework/Resources:
$$(Q) mkdir -p $$(dir $$@)
$4(Q) ln -fs Versions/A/Resources $$@

.libs/$(1)/$(2).framework/Versions/Current: | .libs/$(1)
$$(Q) mkdir -p $$(dir $$@)
$$(Q) ln -fs A $$@

PLATFORM_FRAMEWORK_SYMLINKS_TEMPLATE_$(4)_TARGETS += \
.libs/$(1)/$(2).framework/$(2) \
.libs/$(1)/$(2).framework/Resources \
.libs/$(1)/$(2).framework/Versions/Current \

all-local:: $$(PLATFORM_FRAMEWORK_SYMLINKS_TEMPLATE_$(4)_TARGETS)
endef
$(foreach swiftTest,$(SWIFT_TESTS),$(foreach xcframeworkPlatform,$(XCFRAMEWORK_DESKTOP_PLATFORMS),$(eval $(call PlatformFrameworkSymlinksTemplate,$(swiftTest),$(xcframeworkPlatform)))))

.libs/ios-fat .libs/tvos-fat .libs/maccatalyst-fat .libs/macos-fat:
$(Q) mkdir -p $@

Expand Down Expand Up @@ -426,15 +527,16 @@ LIBTEST2_XCFRAMEWORKS += $(foreach platform,$(XCPLATFORMS),.libs/$(platform)/lib

all-local:: .libs/libtest2.xcframework

SWIFTTEST_XCFRAMEWORKS += $(foreach platform,$(XCPLATFORMS),.libs/$(platform)/SwiftTest.framework)
SWIFTTEST_XCTARGETS += \
$(foreach platform,$(XCPLATFORMS),.libs/$(platform)/SwiftTest.framework.stamp) \

.libs/SwiftTest.xcframework: $(SWIFTTEST_XCTARGETS) Makefile
$(Q) rm -rf $@
$(Q_GEN) $(XCODE_DEVELOPER_ROOT)/usr/bin/xcodebuild -quiet -create-xcframework $(foreach fw,$(SWIFTTEST_XCFRAMEWORKS),-framework $(fw)) -output $@

all-local:: .libs/SwiftTest.xcframework
define SwiftXCFramework
$(1)_XCFRAMEWORKS += $$(foreach xcframeworkPlatform,$$(XCFRAMEWORK_PLATFORMS),.libs/$$(xcframeworkPlatform)/$(1).framework)
$(1)_XCTARGETS += $$(foreach xcframeworkPlatform,$$(XCFRAMEWORK_PLATFORMS),.libs/$$(xcframeworkPlatform)/$(1).framework/$(1))
.libs/$(1).xcframework: $$($(1)_XCTARGETS) Makefile
$$(Q) rm -rf $$@
$$(Q_GEN) $$(XCODE_DEVELOPER_ROOT)/usr/bin/xcodebuild -quiet -create-xcframework $$(foreach fw,$$($(1)_XCFRAMEWORKS),-framework $$(fw)) -output $$@
all-local:: .libs/$(1).xcframework
swift:: .libs/$(1).xcframework
endef
$(foreach swiftTest,$(SWIFT_TESTS),$(eval $(call SwiftXCFramework,$(swiftTest))))

define ZippedXcframework
.libs/$(1).xcframework.zip: .libs/$(1).xcframework
Expand Down
Loading

0 comments on commit 7dba6e3

Please sign in to comment.