By adding the 'LinkWithSwiftSystemLibraries=true' property in a project file, we'll now add the location of Swift's system libraries to the linker arguments. Fixes https://github.com/xamarin/xamarin-macios/issues/18848.
This commit is contained in:
Родитель
595f1ecb7d
Коммит
ee31d72643
|
@ -1473,9 +1473,25 @@
|
|||
_CompileNativeExecutable;
|
||||
_ReidentifyDynamicLibraries;
|
||||
_ComputeLinkNativeExecutableInputs;
|
||||
_AddSwiftLinkerFlags;
|
||||
</_LinkNativeExecutableDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="_AddSwiftLinkerFlags" Condition="'$(LinkWithSwiftSystemLibraries)' == 'true'" DependsOnTargets="_DetectSdkLocations">
|
||||
<PropertyGroup>
|
||||
<_SwiftTargetPlatform Condition="'$(_PlatformName)' == 'iOS' And '$(_SdkIsSimulator)' == 'true'">iphonesimulator</_SwiftTargetPlatform>
|
||||
<_SwiftTargetPlatform Condition="'$(_PlatformName)' == 'iOS' And '$(_SdkIsSimulator)' != 'true'">iphoneos</_SwiftTargetPlatform>
|
||||
<_SwiftTargetPlatform Condition="'$(_PlatformName)' == 'tvOS' And '$(_SdkIsSimulator)' == 'true'">appletvsimulator</_SwiftTargetPlatform>
|
||||
<_SwiftTargetPlatform Condition="'$(_PlatformName)' == 'tvOS' And '$(_SdkIsSimulator)' != 'true'">appletvos</_SwiftTargetPlatform>
|
||||
<_SwiftTargetPlatform Condition="'$(_PlatformName)' == 'MacCatalyst'">macosx</_SwiftTargetPlatform> <!-- yes, 'macosx' and not 'maccatalyst': even though the resulting maccatalyst directory exists, it doesn't have anything useful in it -->
|
||||
<_SwiftTargetPlatform Condition="'$(_PlatformName)' == 'macOS'">macosx</_SwiftTargetPlatform>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<_MainLinkerFlags Include="-L$(_SdkDevPath)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(_SwiftTargetPlatform)/" />
|
||||
<_MainLinkerFlags Include="-L$(_SdkRoot)/usr/lib/swift/" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="_ComputeLinkNativeExecutableInputs" Condition="'$(IsMacEnabled)' == 'true'">
|
||||
<PropertyGroup>
|
||||
<_ExportedSymbolsFile Condition="'$(_ExportedSymbolsFile)' == '' and '$(_MtouchSymbolsList)' == ''">/dev/null</_ExportedSymbolsFile> <!-- nothing to export -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче