-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Update NativeAOT build integration targets to include ioslike platforms #82086
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThis PR updates NativeAOT build integration targets to include ios and iossimulator, and contributes to dotnet/sdk#30068. /cc: @ivanpovazan @akoeplinger
|
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
…s/runtime into feature/nativeaot-targets-ios
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Outdated
Show resolved
Hide resolved
…iler.SingleEntry.targets Co-authored-by: Filip Navara <filip.navara@gmail.com>
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Show resolved
Hide resolved
…e.targets Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
…iler.SingleEntry.targets Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
Outdated
Show resolved
Hide resolved
…iler.SingleEntry.targets Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Show resolved
Hide resolved
…Native.OpenSsl for iOS platforms
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
…Native.OpenSsl for iOSLike platforms
@@ -23,13 +23,20 @@ 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('maccatalyst'))">maccatalyst</TargetOS> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use here the same principle as above with: <OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('win'))">win</OSIdentifier>
in the "first-match-wins" approach, and include '$(TargetOS)' == ''
condition in this case as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, otherwise it won't select the first match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up until now, these are not meant to be set from the outside, so we should also remove it from OSIdentifier
since there is no use-case for it. We try to limit unnecessary extension points which become hard to maintain later and to justify their removal during refactoring. I am planning to look into deduplicating these two lists as we really need a single list of hardcoded platforms for shipping targets (ideally we shouldn't be even needing that and directly rely on SDK provided properties...).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your concern and agree that if these properties are not meant to be extensible, the conditions should be removed (in both places).
However, if this is going to be changed in the near future in any case, can we agree on the implementation for this PR, so we can close it?
@jkotas what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we agree on the implementation for this PR, so we can close it?
Sure, I'll follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jkotas what do you think?
I agree that this can use refactoring that can be done as a follow up (not required for this PR).
<NativeFramework Include="CoreFoundation" /> | ||
<NativeFramework Include="CryptoKit" /> | ||
<NativeFramework Include="Foundation" /> | ||
<NativeFramework Include="Security" /> | ||
<NativeFramework Include="GSS" /> | ||
<!-- The library builds don't reference the GSS API on tvOS builds. --> | ||
<NativeFramework Condition="'$(TargetOS)' != 'tvos' and '$(TargetOS)' != 'tvossimulator'" Include="GSS" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Use $(TargetOS.StartsWith('tvos'))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure about negating the condition (didn't find it in the repository). Would $(!TargetOS.StartsWith('tvos'))
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the explicit version a bit easier to read. !$(TargetOS.StartsWith('tvos'))
(!
first) should work but I didn't try it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also find the explicit version easier to reason about.
FWIW: Failures are unrelated |
Failure looks relevant. Seems that 407edf3 conditioned out libraries related to |
Seeing it here as well: https://github.com/dotnet/runtime/pull/82249/checks?check_run_id=11417387284 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@MichalStrehovsky is there anything else that would prevent us from merging this ?
@@ -63,11 +63,13 @@ The .NET Foundation licenses this file to you under the MIT license. | |||
|
|||
<ItemGroup> | |||
<NetCoreAppNativeLibrary Include="System.Native" /> | |||
<NetCoreAppNativeLibrary Include="System.Globalization.Native" Condition="'$(StaticICULinking)' != 'true'" /> | |||
<!-- FIXME: The library is currently not available for iOS-like platforms --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an issue we could link to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just created and linked: #82389
This PR updates NativeAOT build integration targets to include ioslike platforms, and contributes to dotnet/sdk#30068.
/cc: @ivanpovazan @akoeplinger