forked from MeloNX/MeloNX
iOS - Linker Fixes
This commit is contained in:
parent
cdf188a434
commit
5d919039d9
@ -1,14 +1,16 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<RuntimeIdentifiers>linux-bionic-arm64;ios-arm64</RuntimeIdentifiers>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LinkerFlavor Condition="'$(RuntimeIdentifier)'=='linux-bionic-arm64'">lld</LinkerFlavor>
|
<LinkerFlavor Condition="'$(RuntimeIdentifier)'=='linux-bionic-arm64'">lld</LinkerFlavor>
|
||||||
<DefineConstants>$(DefineConstants);FORCE_EXTERNAL_BASE_DIR</DefineConstants>
|
<DefineConstants>$(DefineConstants);FORCE_EXTERNAL_BASE_DIR</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PublishAot>true</PublishAot>
|
<PublishAot>true</PublishAot>
|
||||||
<NativeLib>Shared</NativeLib>
|
<PublishAotUsingRuntimePack>true</PublishAotUsingRuntimePack>
|
||||||
|
<!-- Not sure why, but on iOS this results in an error. Result is still a .dylib. -->
|
||||||
|
<NativeLib Condition="'$(RuntimeIdentifier)'=='linux-bionic-arm64'">Shared</NativeLib>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
@ -18,6 +20,40 @@
|
|||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OptimizationPreference>Speed</OptimizationPreference>
|
<OptimizationPreference>Speed</OptimizationPreference>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- iOS Linking Fixes -->
|
||||||
|
<Target Condition="'$(RuntimeIdentifier)'=='ios-arm64'" Name="PrepareBeforeIlcCompile" BeforeTargets="IlcCompile">
|
||||||
|
<Exec Command="xcrun xcode-select -p" ConsoleToMSBuild="true">
|
||||||
|
<Output TaskParameter="ConsoleOutput" PropertyName="XcodeSelect" />
|
||||||
|
</Exec>
|
||||||
|
<PropertyGroup>
|
||||||
|
<XcodePath>$(XcodeSelect)</XcodePath>
|
||||||
|
<XcodePath>$([MSBuild]::EnsureTrailingSlash('$(XCodePath)'))</XcodePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Message Importance="normal" Text="Found Xcode at $(XcodeSelect)" />
|
||||||
|
<ItemGroup>
|
||||||
|
<LinkerArg Include="-Wl,-ld_classic" />
|
||||||
|
<LinkerArg Include="-isysroot %22$(XcodePath)Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk%22"
|
||||||
|
Condition=" $(RuntimeIdentifier.Contains('simulator')) "/>
|
||||||
|
<LinkerArg Include="-isysroot %22$(XcodePath)Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk%22"
|
||||||
|
Condition=" !$(RuntimeIdentifier.Contains('simulator')) "/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
<Target Condition="'$(RuntimeIdentifier)'=='ios-arm64'" Name="FixDylib" AfterTargets="Publish">
|
||||||
|
<Exec Command="install_name_tool -id @rpath/$(TargetName).dylib $(NativeBinary)" ConsoleToMSBuild="true" />
|
||||||
|
</Target>
|
||||||
|
<Target Condition="'$(RuntimeIdentifier)'=='ios-arm64'" Name="FixSymbols" AfterTargets="Publish">
|
||||||
|
<RemoveDir Directories="$(PublishDir)$(TargetName).framework.dSYM"/>
|
||||||
|
<!-- create-xcframework (called from the export plugin wants the symbol files in a directory
|
||||||
|
with a slightly different name from the one created by dotnet publish, so we copy them over
|
||||||
|
to the correctly-named directory -->
|
||||||
|
<ItemGroup>
|
||||||
|
<SymbolFiles Include="$(NativeBinary).dsym\**\*.*"/>
|
||||||
|
</ItemGroup>
|
||||||
|
<Copy SourceFiles="@(SymbolFiles)" DestinationFolder="$(PublishDir)$(TargetName).framework.dSYM"/>
|
||||||
|
</Target>
|
||||||
|
<!-- End iOS Linking Fixes -->
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Ryujinx.Audio.Backends.OpenAL\Ryujinx.Audio.Backends.OpenAL.csproj" />
|
<ProjectReference Include="..\Ryujinx.Audio.Backends.OpenAL\Ryujinx.Audio.Backends.OpenAL.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Audio.Backends.SDL2\Ryujinx.Audio.Backends.SDL2.csproj" />
|
<ProjectReference Include="..\Ryujinx.Audio.Backends.SDL2\Ryujinx.Audio.Backends.SDL2.csproj" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user