|
1188 | 1188 | </PropertyGroup> |
1189 | 1189 | <ItemGroup> |
1190 | 1190 | <!-- Create the ComputedRelativePath metadata from RelativePath --> |
1191 | | - <_DynamicLibraryToReidentify Include="@(_FileNativeReference)" Condition="'%(Extension)' == '.dylib'"> |
| 1191 | + <_DynamicLibraryToReidentify Include="@(_FileNativeReference)" Condition="'%(Kind)' == 'Dynamic'"> |
1192 | 1192 | <SourceItemGroup>_FileNativeReference</SourceItemGroup> |
1193 | 1193 | <ComputedRelativePath>%(_FileNativeReference.RelativePath)</ComputedRelativePath> |
1194 | 1194 | </_DynamicLibraryToReidentify> |
|
1233 | 1233 | Outputs="$(_IntermediateNativeLibraryDir)$(_NativeExecutableName);$(_MtouchSymbolsList)" |
1234 | 1234 | > |
1235 | 1235 |
|
| 1236 | + <ItemGroup Condition="'$(IsMacEnabled)' == 'true'"> |
| 1237 | + <_NativeReferences Include="@(_FrameworkNativeReference)" /> |
| 1238 | + <!-- Do not link native references with LinkToExecutable='false' such as PluginLibrary files --> |
| 1239 | + <_NativeReferences Include="@(_FileNativeReference)" Condition="'%(_FileNativeReference.LinkToExecutable)' != 'false'" /> |
| 1240 | + </ItemGroup> |
| 1241 | + |
1236 | 1242 | <LinkNativeCode |
1237 | 1243 | SessionId="$(BuildSessionId)" |
1238 | 1244 | DylibRPath="$(_DylibRPath)" |
|
1242 | 1248 | LinkerFlags="@(_AssemblyLinkerFlags);@(_ReferencesLinkerFlags);@(_MainLinkerFlags);@(_CustomLinkFlags)" |
1243 | 1249 | LinkWithLibraries="@(_XamarinMainLibraries);@(_BindingLibraryLinkWith);@(_MainLinkWith)" |
1244 | 1250 | MinimumOSVersion="$(_MinimumOSVersion)" |
1245 | | - NativeReferences="@(_FileNativeReference);@(_FrameworkNativeReference)" |
| 1251 | + NativeReferences="@(_NativeReferences)" |
1246 | 1252 | ObjectFiles="@(_NativeExecutableObjectFiles)" |
1247 | 1253 | OutputFile="$(_IntermediateNativeLibraryDir)$(_NativeExecutableName)" |
1248 | 1254 | SdkDevPath="$(_SdkDevPath)" |
|
1369 | 1375 | Update="@(ResolvedFileToPublish)" |
1370 | 1376 | RelativePath="$(_AssemblyPublishDir)\%(ResolvedFileToPublish.DestinationSubDirectory)\%(ResolvedFileToPublish.TargetPath)" |
1371 | 1377 | Condition="'$(AppConfig)' != '' And '%(ResolvedFileToPublish.OriginalItemSpec)' == '$(AppConfig)' And '%(ResolvedFileToPublish.Link)' == 'app.config' And '%(ResolvedFileToPublish.TargetPath)' != ''" /> |
1372 | | - <!-- .dylib are never needed (nor allowed) for fully AOT'ed applications FIXME https://github.com/xamarin/xamarin-macios/issues/11145 --> |
| 1378 | + <!-- .dylib and .so are never needed (nor allowed) for fully AOT'ed applications FIXME https://github.com/xamarin/xamarin-macios/issues/11145 --> |
1373 | 1379 | <ResolvedFileToPublish |
1374 | 1380 | Update="@(ResolvedFileToPublish)" |
1375 | 1381 | RelativePath="$(_DylibPublishDir)\%(Filename)%(Extension)" |
1376 | | - Condition="('$(_SdkIsSimulator)' != 'false' Or '$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst') And '%(Extension)' == '.dylib'" /> |
| 1382 | + Condition="('$(_SdkIsSimulator)' != 'false' Or '$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst') And ('%(Extension)' == '.dylib' Or '%(Extension)' == '.so') " /> |
1377 | 1383 |
|
1378 | 1384 | <!-- Don't publish any icu*dat file (by setting PublishFolderType = None) --> |
1379 | 1385 | <ResolvedFileToPublish |
|
1519 | 1525 | <!-- we link with dynamic libraries, and we copy them to the app bundle (the copying part is handled in _ComputeDynamicLibrariesToPublish) --> |
1520 | 1526 | <_ResolvedFileToPublish_DynamicLibrary Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.PublishFolderType)' == 'DynamicLibrary'" /> |
1521 | 1527 | <_FileNativeReference Include="@(_ResolvedFileToPublish_DynamicLibrary)" Kind="Dynamic" /> |
| 1528 | + <!-- we link with dynamic libraries, and we copy them to the app bundle (the copying part is handled in _ComputeDynamicLibrariesToPublish) --> |
| 1529 | + <_ResolvedFileToPublish_PluginLibrary Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.PublishFolderType)' == 'PluginLibrary'" /> |
| 1530 | + <_FileNativeReference Include="@(_ResolvedFileToPublish_PluginLibrary)" Kind="Dynamic" LinkToExecutable="false" /> |
1522 | 1531 | <ResolvedFileToPublish Remove="@(_ResolvedFileToPublish_DynamicLibrary)" /> |
| 1532 | + <ResolvedFileToPublish Remove="@(_ResolvedFileToPublish_PluginLibrary)" /> |
1523 | 1533 |
|
1524 | 1534 | <!-- we link with the contents of binding resource packages, but the packages themselves aren't copied to the app bundle, so remove them here --> |
1525 | 1535 | <_AppleBindingResourcePackage Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.PublishFolderType)' == 'AppleBindingResourcePackage'" /> |
|
0 commit comments