Skip to content

Commit

Permalink
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)
Browse files Browse the repository at this point in the history
Specialize the tvOS version of ILLink.LinkAttributes.xml, where we don't
include the "ObjCRuntime.AvailabilityAttribute" type (because it doesn't exist
in tvOS).

Fixes this linker warning:

    resource ILLink.LinkAttributes.xml in Xamarin.TVOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065(37,6): warning IL2008: Could not resolve type 'ObjCRuntime.AvailabilityAttribute'
  • Loading branch information
rolfbjarne committed Jul 14, 2021
1 parent 7ac3417 commit dacf374
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 2 deletions.
74 changes: 74 additions & 0 deletions src/ILLink.LinkAttributes.tvos.xml
@@ -0,0 +1,74 @@
<linker>
<assembly fullname="Xamarin.TVOS">
<!-- Foundation -->
<type fullname="Foundation.AdviceAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="Foundation.FieldAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="Foundation.NotImplementedAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>

<!-- double-check when applied -->
<type fullname="Foundation.PreserveAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="Foundation.FieldAttribute">
<attribute internal="LinkerSafeAttribute" />
</type>

<!-- ObjCRuntime -->
<type fullname="ObjCRuntime.BindingImplAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.DesignatedInitializerAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.RequiresSuperAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.ThreadSafeAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>

<type fullname="ObjCRuntime.AvailabilityBaseAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.DeprecatedAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.IntroducedAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.ObsoletedAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.UnavailableAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.NoiOSAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.NoMacAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.NoMacCatalystAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.NoTVAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="ObjCRuntime.NoWatchAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<!-- special case (no namespace) -->
<type fullname="iOSAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
<type fullname="MacAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>
</assembly>
</linker>
4 changes: 2 additions & 2 deletions src/Makefile
Expand Up @@ -1076,9 +1076,9 @@ $(TVOS_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in $(TOP)/Make.con
$(Q) rm -f $@.tmp
$(Q) touch $@

$(TVOS_DOTNET_BUILD_DIR)/ILLink.LinkAttributes.xml: $(TOP)/src/ILLink.LinkAttributes.xml.in
$(TVOS_DOTNET_BUILD_DIR)/ILLink.LinkAttributes.xml: ILLink.LinkAttributes.tvos.xml
$(Q) mkdir -p $(TVOS_DOTNET_BUILD_DIR)
$(call Q_PROF_GEN,tvos) sed < $< > $@ 's|@PRODUCT_NAME@|Xamarin.TVOS|g;'
$(Q) $(CP) $< $@

$(TVOS_DOTNET_BUILD_DIR)/ILLink.Substitutions.xml: $(TOP)/src/ILLink.Substitutions.tvos.xml
$(Q) $(CP) $< $@
Expand Down

8 comments on commit dacf374

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ [CI Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
ℹ️ Generator Diff (please review changes)

Packages generated

View packages

🎉 All 221 tests passed 🎉

Pipeline on Agent XAMBOT-1035.BigSur'
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests tvOS 🔥

Not enough free space in the host.

Pipeline on Agent
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac Catalina (10.15) ✅

Tests passed

All tests on macOS X Mac Catalina (10.15) passed.

Pipeline on Agent
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac Mojave (10.14) ✅

Tests passed

All tests on macOS X Mac Mojave (10.14) passed.

Pipeline on Agent
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac High Sierra (10.13) ✅

Tests passed

All tests on macOS X Mac High Sierra (10.13) passed.

Pipeline on Agent
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests iOS32b). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[src] Specialize the tvOS version of ILLink.LinkAttributes.xml. (#12108)

Please sign in to comment.