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 18 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 @@ -2,10 +2,15 @@

<PropertyGroup Condition="'$(RuntimeIdentifier)' != ''">
<!-- 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('freebsd'))">freebsd</OSIdentifier>
<OSIdentifier Condition="$(RuntimeIdentifier.StartsWith('linux-musl')) OR $(RuntimeIdentifier.StartsWith('alpine'))">linux-musl</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('win'))">win</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('osx'))">osx</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('maccatalyst'))">maccatalyst</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('iossimulator'))">iossimulator</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('ios'))">ios</OSIdentifier>
kotlarmilos marked this conversation as resolved.
Show resolved Hide resolved
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('tvossimulator'))">tvossimulator</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('tvos'))">tvos</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and $(RuntimeIdentifier.StartsWith('freebsd'))">freebsd</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == '' and ($(RuntimeIdentifier.StartsWith('linux-musl')) or $(RuntimeIdentifier.StartsWith('alpine')))">linux-musl</OSIdentifier>
<OSIdentifier Condition="'$(OSIdentifier)' == ''">linux</OSIdentifier>

<!-- Determine TargetArchitecture from RuntimeIdentifier -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ The .NET Foundation licenses this file to you under the MIT license.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CppCompilerAndLinkerAlternative />
<CppCompilerAndLinkerAlternative Condition="'$(CppCompilerAndLinker)' == '' and '$(TargetOS)' != 'osx'">gcc</CppCompilerAndLinkerAlternative>
<CppCompilerAndLinkerAlternative Condition="'$(CppCompilerAndLinker)' == '' and '$(_IsApplePlatform)' != 'true'">gcc</CppCompilerAndLinkerAlternative>
<CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">clang</CppCompilerAndLinker>
<CppLinker>$(CppCompilerAndLinker)</CppLinker>
<CppLibCreator>ar</CppLibCreator>
<DsymUtilOptions Condition="'$(TargetOS)' == 'osx'">--flat</DsymUtilOptions>
<_SymbolPrefix Condition="'$(TargetOS)' == 'osx'">_</_SymbolPrefix>
<DsymUtilOptions Condition="'$(_IsApplePlatform)' == 'true'">--flat</DsymUtilOptions>
<_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_</_SymbolPrefix>
<UseLLVMLinker Condition="'$(UseLLVMLinker)' == '' and '$(TargetOS)' == 'freebsd'">true</UseLLVMLinker>
</PropertyGroup>

Expand All @@ -35,16 +35,16 @@ The .NET Foundation licenses this file to you under the MIT license.

<CrossCompileArch />
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-x64'))">x86_64</CrossCompileArch>
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(TargetOS)' != 'osx'">aarch64</CrossCompileArch>
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(TargetOS)' == 'osx'">arm64</CrossCompileArch>
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(_IsApplePlatform)' != 'true'">aarch64</CrossCompileArch>
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(_IsApplePlatform)' == 'true'">arm64</CrossCompileArch>

<TargetTriple />
<TargetTriple Condition="'$(CrossCompileArch)' != ''">$(CrossCompileArch)-linux-gnu</TargetTriple>
<TargetTriple Condition="'$(CrossCompileArch)' != '' and ($(CrossCompileRid.StartsWith('linux-musl')) or $(CrossCompileRid.StartsWith('alpine')))">$(CrossCompileArch)-alpine-linux-musl</TargetTriple>
<TargetTriple Condition="'$(CrossCompileArch)' != '' and ($(CrossCompileRid.StartsWith('freebsd')))">$(CrossCompileArch)-unknown-freebsd12</TargetTriple>

<IlcRPath Condition="'$(IlcRPath)' == '' and '$(TargetOS)' != 'osx'">$ORIGIN</IlcRPath>
<IlcRPath Condition="'$(IlcRPath)' == '' and '$(TargetOS)' == 'osx'">@executable_path</IlcRPath>
<IlcRPath Condition="'$(IlcRPath)' == '' and '$(_IsApplePlatform)' != 'true'">$ORIGIN</IlcRPath>
<IlcRPath Condition="'$(IlcRPath)' == '' and '$(_IsApplePlatform)' == 'true'">@executable_path</IlcRPath>

<EventPipeName>libeventpipe-disabled</EventPipeName>
<EventPipeName Condition="'$(EnableNativeEventPipe)' == 'true'">libeventpipe-enabled</EventPipeName>
Expand All @@ -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 -->
Copy link
Member

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?

Copy link
Member

@ivanpovazan ivanpovazan Feb 20, 2023

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

<NetCoreAppNativeLibrary Include="System.Globalization.Native" Condition="'$(StaticICULinking)' != 'true' and '$(_IsApplePlatform)' != 'true'" />
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
<NetCoreAppNativeLibrary Include="System.IO.Compression.Native" />
<NetCoreAppNativeLibrary Include="System.Net.Security.Native" />
<NetCoreAppNativeLibrary Include="System.Security.Cryptography.Native.Apple" Condition="'$(TargetOS)' == 'osx'" />
<NetCoreAppNativeLibrary Include="System.Security.Cryptography.Native.OpenSsl" Condition="'$(StaticOpenSslLinking)' != 'true'" />
<NetCoreAppNativeLibrary Include="System.Security.Cryptography.Native.Apple" Condition="'$(_IsApplePlatform)' == 'true'" />
<!-- Not compliant for iOS-like platforms -->
<NetCoreAppNativeLibrary Include="System.Security.Cryptography.Native.OpenSsl" Condition="'$(StaticOpenSslLinking)' != 'true' and '$(_IsApplePlatform)' != 'true'" />
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -100,52 +102,53 @@ The .NET Foundation licenses this file to you under the MIT license.
<StaticSslLibs Include="-Wl,-Bdynamic" Condition="'$(StaticExecutable)' != 'true'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetOS)' == 'osx'">
<ItemGroup Condition="'$(_IsApplePlatform)' == 'true'">
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
<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" />
Copy link
Member

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'))

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member

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.

</ItemGroup>

<ItemGroup>
<LinkerArg Include="-fuse-ld=lld" Condition="'$(UseLLVMLinker)' == 'true'" />
<LinkerArg Include="@(NativeLibrary)" />
<LinkerArg Include="--sysroot=$(SysRoot)" Condition="'$(SysRoot)' != ''" />
<LinkerArg Include="--target=$(TargetTriple)" Condition="'$(TargetOS)' != 'osx' and '$(TargetTriple)' != ''" />
<LinkerArg Include="-arch $(CrossCompileArch)" Condition="'$(TargetOS)' == 'osx' and '$(CrossCompileArch)' != ''" />
<LinkerArg Include="--target=$(TargetTriple)" Condition="'$(_IsApplePlatform)' != 'true' and '$(TargetTriple)' != ''" />
<LinkerArg Include="-arch $(CrossCompileArch)" Condition="'$(_IsApplePlatform)' == 'true' and '$(CrossCompileArch)' != ''" />
<LinkerArg Include="-g" Condition="$(NativeDebugSymbols) == 'true'" />
<LinkerArg Include="-Wl,--strip-debug" Condition="$(NativeDebugSymbols) != 'true' and '$(TargetOS)' != 'osx'" />
<LinkerArg Include="-Wl,--strip-debug" Condition="$(NativeDebugSymbols) != 'true' and '$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-Wl,-rpath,'$(IlcRPath)'" Condition="'$(StaticExecutable)' != 'true'" />
<LinkerArg Include="-Wl,--build-id=sha1" Condition="'$(TargetOS)' != 'osx'" />
<LinkerArg Include="-Wl,--as-needed" Condition="'$(TargetOS)' != 'osx'" />
<LinkerArg Include="-Wl,-e0x0" Condition="'$(NativeLib)' == 'Shared' and '$(TargetOS)' != 'osx'" />
<LinkerArg Include="-pthread" Condition="'$(TargetOS)' != 'osx'" />
<LinkerArg Include="-Wl,--build-id=sha1" Condition="'$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-Wl,--as-needed" Condition="'$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-Wl,-e0x0" Condition="'$(NativeLib)' == 'Shared' and '$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-pthread" Condition="'$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-lstdc++" Condition="'$(LinkStandardCPlusPlusLibrary)' == 'true'" />
<LinkerArg Include="-ldl" />
<LinkerArg Include="-lobjc" Condition="'$(TargetOS)' == 'osx'" />
<LinkerArg Include="-lswiftCore" Condition="'$(TargetOS)' == 'osx'" />
<LinkerArg Include="-lswiftFoundation" Condition="'$(TargetOS)' == 'osx'" />
<LinkerArg Include="-lobjc" Condition="'$(_IsApplePlatform)' == 'true'" />
<LinkerArg Include="-lswiftCore" Condition="'$(_IsApplePlatform)' == 'true'" />
<LinkerArg Include="-lswiftFoundation" Condition="'$(_IsApplePlatform)' == 'true'" />
<LinkerArg Include="-lz" />
<LinkerArg Include="-lrt" Condition="'$(TargetOS)' != 'osx'" />
<LinkerArg Include="-licucore" Condition="'$(TargetOS)' == 'osx'" />
<LinkerArg Include="-L/usr/lib/swift" Condition="'$(TargetOS)' == 'osx'" />
<LinkerArg Include="-lrt" Condition="'$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-licucore" Condition="'$(_IsApplePlatform)' == 'true'" />
<LinkerArg Include="-L/usr/lib/swift" Condition="'$(_IsApplePlatform)' == 'true'" />
<LinkerArg Include="@(StaticNumaLibs)" Condition="'$(StaticNumaLinking)' == 'true'" />
<LinkerArg Include="@(StaticICULibs)" Condition="'$(StaticICULinking)' == 'true'" />
<LinkerArg Include="@(StaticSslLibs)" Condition="'$(StaticOpenSslLinking)' == 'true'" />
<LinkerArg Include="-lm" />
<LinkerArg Include="-static" Condition="'$(StaticExecutable)' == 'true' and '$(PositionIndependentExecutable)' == 'false'" />
<LinkerArg Include="-static-pie" Condition="'$(StaticExecutable)' == 'true' and '$(PositionIndependentExecutable)' != 'false'" />
<LinkerArg Include="-dynamiclib" Condition="'$(TargetOS)' == 'osx' and '$(NativeLib)' == 'Shared'" />
<LinkerArg Include="-shared" Condition="'$(TargetOS)' != 'osx' and '$(NativeLib)' == 'Shared'" />
<LinkerArg Include="-dynamiclib" Condition="'$(_IsApplePlatform)' == 'true' and '$(NativeLib)' == 'Shared'" />
<LinkerArg Include="-shared" Condition="'$(_IsApplePlatform)' != 'true' and '$(NativeLib)' == 'Shared'" />
<!-- binskim warning BA3001 PIE disabled on executable -->
<LinkerArg Include="-pie -Wl,-pie" Condition="'$(TargetOS)' != 'osx' and '$(NativeLib)' == '' and '$(StaticExecutable)' != 'true' and '$(PositionIndependentExecutable)' != 'false'" />
<LinkerArg Include="-Wl,-no-pie" Condition="'$(TargetOS)' != 'osx' and '$(NativeLib)' == '' and '$(StaticExecutable)' != 'true' and '$(PositionIndependentExecutable)' == 'false'" />
<LinkerArg Include="-pie -Wl,-pie" Condition="'$(_IsApplePlatform)' != 'true' and '$(NativeLib)' == '' and '$(StaticExecutable)' != 'true' and '$(PositionIndependentExecutable)' != 'false'" />
<LinkerArg Include="-Wl,-no-pie" Condition="'$(_IsApplePlatform)' != 'true' and '$(NativeLib)' == '' and '$(StaticExecutable)' != 'true' and '$(PositionIndependentExecutable)' == 'false'" />
<!-- binskim warning BA3010 The GNU_RELRO segment is missing -->
<LinkerArg Include="-Wl,-z,relro" Condition="'$(TargetOS)' != 'osx'" />
<LinkerArg Include="-Wl,-z,relro" Condition="'$(_IsApplePlatform)' != 'true'" />
<!-- binskim warning BA3011 The BIND_NOW flag is missing -->
<LinkerArg Include="-Wl,-z,now" Condition="'$(TargetOS)' != 'osx'" />
<LinkerArg Include="-Wl,-u,$(_SymbolPrefix)NativeAOT_StaticInitialization" Condition="('$(UseLLVMLinker)' == 'true' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'freebsd') and ('$(NativeLib)' == 'Shared' or '$(CustomNativeMain)' == 'true')" />
<LinkerArg Include="-Wl,-z,now" Condition="'$(_IsApplePlatform)' != 'true'" />
<LinkerArg Include="-Wl,-u,$(_SymbolPrefix)NativeAOT_StaticInitialization" Condition="('$(UseLLVMLinker)' == 'true' or '$(_IsApplePlatform)' == 'true' or '$(TargetOS)' == 'freebsd') and ('$(NativeLib)' == 'Shared' or '$(CustomNativeMain)' == 'true')" />
<LinkerArg Include="-Wl,--require-defined,NativeAOT_StaticInitialization" Condition="'$(UseLLVMLinker)' != 'true' and '$(TargetOS)' == 'linux' and ('$(NativeLib)' == 'Shared' or '$(CustomNativeMain)' == 'true')" />
<!-- this workaround can be deleted once the minimum supported glibc version
(runtime's official build machine's glibc version) is at least 2.33
Expand All @@ -156,7 +159,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<!-- FreeBSD's inotify is an installed package and not found in default libraries -->
<LinkerArg Include="-L/usr/local/lib -linotify" Condition="'$(TargetOS)' == 'freebsd'" />

<LinkerArg Include="@(NativeFramework->'-framework %(Identity)')" Condition="'$(TargetOS)' == 'osx'" />
<LinkerArg Include="@(NativeFramework->'-framework %(Identity)')" Condition="'$(_IsApplePlatform)' == 'true'" />
</ItemGroup>

<Exec Command="command -v &quot;$(CppLinker)&quot;" IgnoreExitCode="true" StandardOutputImportance="Low">
Expand All @@ -173,24 +176,24 @@ The .NET Foundation licenses this file to you under the MIT license.
<_WhereLinker>0</_WhereLinker>
</PropertyGroup>

<PropertyGroup Condition="'$(ObjCopyName)' == '' and '$(TargetOS)' != 'osx'">
<PropertyGroup Condition="'$(ObjCopyName)' == '' and '$(_IsApplePlatform)' != 'true'">
<ObjCopyName Condition="!$(CppCompilerAndLinker.Contains('clang'))">objcopy</ObjCopyName>
<ObjCopyName Condition="$(CppCompilerAndLinker.Contains('clang'))">llvm-objcopy</ObjCopyName>
<ObjCopyNameAlternative />
<ObjCopyNameAlternative Condition="$(CppCompilerAndLinker.Contains('clang'))">objcopy</ObjCopyNameAlternative>
</PropertyGroup>

<Error Condition="'$(_WhereLinker)' != '0' and '$(TargetOS)' == 'osx'" Text="Platform linker ('$(CppLinker)') not found in PATH. Try installing Xcode to resolve the problem." />
<Error Condition="'$(_WhereLinker)' != '0' and '$(_IsApplePlatform)' == 'true'" Text="Platform linker ('$(CppLinker)') not found in PATH. Try installing Xcode to resolve the problem." />
<Error Condition="'$(_WhereLinker)' != '0' and '$(CppCompilerAndLinkerAlternative)' != ''"
Text="Platform linker ('$(CppLinker)' or '$(CppCompilerAndLinkerAlternative)') not found in PATH. Try installing appropriate package for $(CppLinker) or $(CppCompilerAndLinkerAlternative) to resolve the problem." />
<Error Condition="'$(_WhereLinker)' != '0' and '$(CppCompilerAndLinkerAlternative)' == '' and '$(TargetOS)' != 'osx'"
<Error Condition="'$(_WhereLinker)' != '0' and '$(CppCompilerAndLinkerAlternative)' == '' and '$(_IsApplePlatform)' != 'true'"
Text="Requested linker ('$(CppLinker)') not found in PATH." />

<Exec Command="command -v &quot;$(ObjCopyName)&quot;" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(TargetOS)' != 'osx' and '$(StripSymbols)' == 'true'">
<Exec Command="command -v &quot;$(ObjCopyName)&quot;" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' != 'true' and '$(StripSymbols)' == 'true'">
<Output TaskParameter="ExitCode" PropertyName="_WhereSymbolStripper" />
</Exec>

<Exec Command="command -v &quot;$(ObjCopyNameAlternative)&quot;" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(TargetOS)' != 'osx' and '$(ObjCopyNameAlternative)' != '' and '$(StripSymbols)' == 'true'">
<Exec Command="command -v &quot;$(ObjCopyNameAlternative)&quot;" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' != 'true' and '$(ObjCopyNameAlternative)' != '' and '$(StripSymbols)' == 'true'">
<Output TaskParameter="ExitCode" PropertyName="_WhereSymbolStripperAlt" />
</Exec>

Expand All @@ -201,16 +204,16 @@ The .NET Foundation licenses this file to you under the MIT license.

<Error Condition="'$(_WhereSymbolStripper)' != '0' and '$(StripSymbols)' == 'true' and '$(ObjCopyNameAlternative)' != ''"
Text="Symbol stripping tool ('$(ObjCopyName)' or '$(ObjCopyNameAlternative)') not found in PATH. Try installing appropriate package for $(ObjCopyName) or $(ObjCopyNameAlternative) to resolve the problem." />
<Error Condition="'$(_WhereSymbolStripper)' != '0' and '$(StripSymbols)' == 'true' and '$(TargetOS)' != 'osx'"
<Error Condition="'$(_WhereSymbolStripper)' != '0' and '$(StripSymbols)' == 'true' and '$(_IsApplePlatform)' != 'true'"
Text="Symbol stripping tool ('$(ObjCopyName)') not found in PATH. Make sure '$(ObjCopyName)' is available in PATH" />

<Exec Command="command -v dsymutil &amp;&amp; command -v strip" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(TargetOS)' == 'osx' and '$(StripSymbols)' == 'true'">
<Exec Command="command -v dsymutil &amp;&amp; command -v strip" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' == 'true' and '$(StripSymbols)' == 'true'">
<Output TaskParameter="ExitCode" PropertyName="_WhereSymbolStripper" />
</Exec>
<Error Condition="'$(_WhereSymbolStripper)' != '0' and '$(StripSymbols)' == 'true' and '$(TargetOS)' != 'osx'"
<Error Condition="'$(_WhereSymbolStripper)' != '0' and '$(StripSymbols)' == 'true' and '$(_IsApplePlatform)' != 'true'"
Text="Symbol stripping tools ('dsymutil' and 'strip') not found in PATH. Make sure 'dsymutil' and 'strip' are available in PATH" />

<Exec Command="dsymutil --help" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(TargetOS)' == 'osx' and '$(StripSymbols)' == 'true'">
<Exec Command="dsymutil --help" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' == 'true' and '$(StripSymbols)' == 'true'">
<Output TaskParameter="ExitCode" PropertyName="_DsymUtilOutput" />
</Exec>

Expand All @@ -220,7 +223,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<Exec Command="CC=&quot;$(CppLinker)&quot; &quot;$(IlcHostPackagePath)/native/src/libs/build-local.sh&quot; &quot;$(IlcHostPackagePath)/&quot; &quot;$(IntermediateOutputPath)&quot; System.Security.Cryptography.Native"
Condition="'$(StaticOpenSslLinking)' == 'true'" />

<PropertyGroup Condition="'$(TargetOS)' == 'osx' and '$(StripSymbols)' == 'true' and $(_DsymUtilOutput.Contains('--minimize'))">
<PropertyGroup Condition="'$(_IsApplePlatform)' == 'true' and '$(StripSymbols)' == 'true' and $(_DsymUtilOutput.Contains('--minimize'))">
<DsymUtilOptions>$(DsymUtilOptions) --minimize</DsymUtilOptions>
</PropertyGroup>
</Target>
Expand Down
Loading