Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NativeAOT build integration targets to include ioslike platforms #82086

Merged
merged 21 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7bfbbce
Adjust Native AOT build integration targets to include ios and iossim…
kotlarmilos Feb 3, 2023
e242cf0
Merge branch 'dotnet:main' into feature/nativeaot-targets-ios
kotlarmilos Feb 14, 2023
28412d7
Resolve conflicts
kotlarmilos Feb 14, 2023
9c7e5d8
Fix TargetOS for iossimulator in build integration targets
kotlarmilos Feb 14, 2023
e1c255d
Revert conditions for linux targets
kotlarmilos Feb 14, 2023
947a514
Add _IsApplePlatform property and update Native.Unix.targets
kotlarmilos Feb 14, 2023
1acfce5
Add tvos, tvossimulator, and maccatalyst to _IsApplePlatform
kotlarmilos Feb 15, 2023
7da9fba
Merge branch 'main' into feature/nativeaot-targets-ios
kotlarmilos Feb 15, 2023
9dd5067
Remove _IsApplePlatform from Native.Unix.targets
kotlarmilos Feb 15, 2023
f4a4964
Merge branch 'feature/nativeaot-targets-ios' of github.com:kotlarmilo…
kotlarmilos Feb 15, 2023
8363dc5
Add a condition to OSIdentifier to respect the order of the checks
kotlarmilos Feb 15, 2023
efb53b5
Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILComp…
kotlarmilos Feb 15, 2023
25df2fc
Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Nativ…
kotlarmilos Feb 15, 2023
6e67656
Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILComp…
kotlarmilos Feb 15, 2023
7012650
Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILComp…
kotlarmilos Feb 15, 2023
a3035e5
Exclude <NativeFramework Include=GSS /> for tvOS[simulator]
kotlarmilos Feb 16, 2023
ee8832a
Exclude System.Globalization.Native and System.Security.Cryptography.…
kotlarmilos Feb 16, 2023
675b5a0
Fix tvOS condition for GSS
kotlarmilos Feb 16, 2023
3283372
Exclude System.Globalization.Native and System.Security.Cryptography.…
kotlarmilos Feb 16, 2023
407edf3
Add condition to TargetOS property
kotlarmilos Feb 17, 2023
f2b51ec
Update tvOS condition
kotlarmilos Feb 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<!-- Define the name of the runtime specific compiler package to import -->
<OSIdentifier Condition="$(RuntimeIdentifier.StartsWith('win'))">win</OSIdentifier>
<OSIdentifier Condition="$(RuntimeIdentifier.StartsWith('osx'))">osx</OSIdentifier>
<OSIdentifier Condition="$(RuntimeIdentifier.StartsWith('ios'))">ios</OSIdentifier>
<OSIdentifier Condition="$(RuntimeIdentifier.StartsWith('iossimulator'))">iossimulator</OSIdentifier>
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
<OSIdentifier Condition="$(RuntimeIdentifier.StartsWith('freebsd'))">freebsd</OSIdentifier>
<OSIdentifier Condition="$(RuntimeIdentifier.StartsWith('linux-musl')) OR $(RuntimeIdentifier.StartsWith('alpine'))">linux-musl</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == ''">linux</OSIdentifier>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ The .NET Foundation licenses this file to you under the MIT license.
<IlcBuildTasksPath Condition="'$(IlcBuildTasksPath)' == ''">$(MSBuildThisFileDirectory)..\tools\netstandard\ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
<TargetOS Condition="$(RuntimeIdentifier.StartsWith('win'))">windows</TargetOS>
<TargetOS Condition="$(RuntimeIdentifier.StartsWith('osx'))">osx</TargetOS>
<TargetOS Condition="$(RuntimeIdentifier.StartsWith('ios'))">ios</TargetOS>
<TargetOS Condition="$(RuntimeIdentifier.StartsWith('iossimulator'))">iossimulator</TargetOS>
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
kotlarmilos marked this conversation as resolved.
Show resolved Hide resolved
<TargetOS Condition="$(RuntimeIdentifier.StartsWith('freebsd'))">freebsd</TargetOS>
<TargetOS Condition="'$(TargetOS)' == ''">linux</TargetOS>
<NativeDebugSymbols Condition="$(DebugSymbols) == 'true' or ($(DebugType) != 'none' and $(DebugType) != '')">true</NativeDebugSymbols>
Expand Down Expand Up @@ -63,14 +65,14 @@ The .NET Foundation licenses this file to you under the MIT license.
<NativeBinaryExt Condition="'$(IsNativeExecutable)' == 'true' and '$(TargetOS)' == 'windows'">.exe</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' == 'true' and '$(TargetOS)' != 'windows'"></NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(TargetOS)' == 'windows' and '$(NativeLib)' == 'Shared'">.dll</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(TargetOS)' == 'osx' and '$(NativeLib)' == 'Shared'">.dylib</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and '$(NativeLib)' == 'Shared'">.so</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and ('$(TargetOS)' == 'osx' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator') and '$(NativeLib)' == 'Shared'">.dylib</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator' and '$(NativeLib)' == 'Shared'">.so</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(TargetOS)' == 'windows' and '$(NativeLib)' == 'Static'">.lib</NativeBinaryExt>
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(TargetOS)' != 'windows' and '$(NativeLib)' == 'Static'">.a</NativeBinaryExt>

<NativeSymbolExt Condition="'$(TargetOS)' == 'osx'">.dwarf</NativeSymbolExt>
<NativeSymbolExt Condition="'$(TargetOS)' == 'osx' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator'">.dwarf</NativeSymbolExt>
<NativeSymbolExt Condition="'$(TargetOS)' == 'windows'">.pdb</NativeSymbolExt>
<NativeSymbolExt Condition="'$(TargetOS)' != 'osx' and '$(TargetOS)' != 'windows'">.dbg</NativeSymbolExt>
<NativeSymbolExt Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator'">.dbg</NativeSymbolExt>

<ExportsFileExt Condition="'$(TargetOS)' == 'windows'">.def</ExportsFileExt>
<ExportsFileExt Condition="'$(TargetOS)' != 'windows'">.exports</ExportsFileExt>
Expand Down Expand Up @@ -304,12 +306,12 @@ The .NET Foundation licenses this file to you under the MIT license.
<CustomLinkerArg Include="/OUT:&quot;$(NativeBinary)&quot;" Condition="'$(TargetOS)' == 'windows'" />
<CustomLinkerArg Include="/DEF:&quot;$(ExportsFile)&quot;" Condition="'$(TargetOS)' == 'windows' and $(ExportsFile) != ''" />
<CustomLinkerArg Include="/LIBPATH:&quot;%(AdditionalNativeLibraryDirectories.Identity)&quot;" Condition="'$(TargetOS)' == 'windows' and '@(AdditionalNativeLibraryDirectories->Count())' &gt; 0" />
<CustomLinkerArg Include="-exported_symbols_list &quot;$(ExportsFile)&quot;" Condition="'$(TargetOS)' == 'osx' and $(ExportsFile) != ''" />
<CustomLinkerArg Include="-Wl,--version-script=$(ExportsFile)" Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and $(ExportsFile) != ''" />
<CustomLinkerArg Include="-exported_symbols_list &quot;$(ExportsFile)&quot;" Condition="('$(TargetOS)' == 'osx' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator') and $(ExportsFile) != ''" />
<CustomLinkerArg Include="-Wl,--version-script=$(ExportsFile)" Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator' and $(ExportsFile) != ''" />
<CustomLinkerArg Condition="Exists('$(_Win32ResFile)')" Include="&quot;$(_Win32ResFile)&quot;" />
<CustomLinkerArg Include="@(LinkerArg)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx'">
<ItemGroup Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator'">
<CustomLinkerArg Include="-Wl,--discard-all" />
<CustomLinkerArg Include="-Wl,--gc-sections" Condition="'$(UseLLVMLinker)' != 'true'" />
</ItemGroup>
Expand All @@ -324,8 +326,8 @@ The .NET Foundation licenses this file to you under the MIT license.
<!-- https://github.com/dotnet/runtimelab/issues/956 - we IgnoreStandardErrorWarningFormat on macOS because there's a lot of warnings -->
<PropertyGroup>
<_IgnoreLinkerWarnings>false</_IgnoreLinkerWarnings>
<_IgnoreLinkerWarnings Condition="'$(TargetOS)' == 'osx'">true</_IgnoreLinkerWarnings>
<StripFlag Condition="'$(TargetOS)' == 'osx' and '$(NativeLib)' == 'Shared'">-x</StripFlag> <!-- keep global symbols in dylib -->
<_IgnoreLinkerWarnings Condition="'$(TargetOS)' == 'osx' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator'">true</_IgnoreLinkerWarnings>
<StripFlag Condition="('$(TargetOS)' == 'osx' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator') and '$(NativeLib)' == 'Shared'">-x</StripFlag> <!-- keep global symbols in dylib -->
</PropertyGroup>

<Exec Command="&quot;$(CppLinker)&quot; @(CustomLinkerArg, ' ')" Condition="'$(TargetOS)' != 'windows' and '$(NativeLib)' != 'Static'" IgnoreStandardErrorWarningFormat="$(_IgnoreLinkerWarnings)" />
Expand All @@ -340,13 +342,13 @@ The .NET Foundation licenses this file to you under the MIT license.
<Exec Command="chmod 644 &quot;$(NativeBinary)&quot;" Condition="'$(TargetOS)' != 'windows' and '$(NativeLib)' == 'Shared'" />

<!-- strip symbols, see https://github.com/dotnet/runtime/blob/5d3288d/eng/native/functions.cmake#L374 -->
<Exec Condition="'$(StripSymbols)' == 'true' and '$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx'"
<Exec Condition="'$(StripSymbols)' == 'true' and '$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator'"
Command="
&quot;$(ObjCopyName)&quot; --only-keep-debug &quot;$(NativeBinary)&quot; &quot;$(NativeBinary)$(NativeSymbolExt)&quot; &amp;&amp;
&quot;$(ObjCopyName)&quot; --strip-debug --strip-unneeded &quot;$(NativeBinary)&quot; &amp;&amp;
&quot;$(ObjCopyName)&quot; --add-gnu-debuglink=&quot;$(NativeBinary)$(NativeSymbolExt)&quot; &quot;$(NativeBinary)&quot;" />

<Exec Condition="'$(StripSymbols)' == 'true' and '$(TargetOS)' == 'osx' and '$(NativeLib)' != 'Static'"
<Exec Condition="'$(StripSymbols)' == 'true' and ('$(TargetOS)' == 'osx' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator') and '$(NativeLib)' != 'Static'"
Command="
dsymutil $(DsymUtilOptions) &quot;$(NativeBinary)&quot; &amp;&amp;
strip -no_code_signature_warning $(StripFlag) &quot;$(NativeBinary)&quot;" />
Expand Down