-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Build integration support for Bionic in NativeAOT #87595
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,7 @@ The .NET Foundation licenses this file to you under the MIT license. | |
| <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('linux-bionic'))">$(CrossCompileArch)-linux-android21</TargetTriple> | ||
| <TargetTriple Condition="'$(CrossCompileArch)' != '' and ($(CrossCompileRid.StartsWith('freebsd')))">$(CrossCompileArch)-unknown-freebsd12</TargetTriple> | ||
|
|
||
| <IlcRPath Condition="'$(IlcRPath)' == '' and '$(_IsApplePlatform)' != 'true'">$ORIGIN</IlcRPath> | ||
|
|
@@ -64,7 +65,7 @@ The .NET Foundation licenses this file to you under the MIT license. | |
| <NetCoreAppNativeLibrary Include="System.Native" /> | ||
| <NetCoreAppNativeLibrary Include="System.Globalization.Native" Condition="'$(StaticICULinking)' != 'true' and '$(InvariantGlobalization)' != 'true'" /> | ||
| <NetCoreAppNativeLibrary Include="System.IO.Compression.Native" /> | ||
| <NetCoreAppNativeLibrary Include="System.Net.Security.Native" /> | ||
| <NetCoreAppNativeLibrary Include="System.Net.Security.Native" Condition="'$(_linuxLibcFlavor)' != 'bionic'" /> | ||
| <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 '$(_IsiOSLikePlatform)' != 'true'" /> | ||
|
|
@@ -122,7 +123,7 @@ The .NET Foundation licenses this file to you under the MIT license. | |
| <LinkerArg Include="-lswiftCore" Condition="'$(_targetOS)' == 'osx'" /> | ||
| <LinkerArg Include="-lswiftFoundation" Condition="'$(_targetOS)' == 'osx'" /> | ||
| <LinkerArg Include="-lz" /> | ||
| <LinkerArg Include="-lrt" Condition="'$(_IsApplePlatform)' != 'true'" /> | ||
| <LinkerArg Include="-lrt" Condition="'$(_IsApplePlatform)' != 'true' and '$(_linuxLibcFlavor)' != 'bionic'" /> | ||
| <LinkerArg Include="-licucore" Condition="'$(_IsApplePlatform)' == 'true'" /> | ||
| <LinkerArg Include="-L/usr/lib/swift" Condition="'$(_targetOS)' == 'osx'" /> | ||
| <LinkerArg Include="@(StaticICULibs)" Condition="'$(StaticICULinking)' == 'true'" /> | ||
|
|
@@ -153,11 +154,16 @@ The .NET Foundation licenses this file to you under the MIT license. | |
| <LinkerArg Include="-Wl,--eh-frame-hdr" Condition="'$(_IsApplePlatform)' != 'true'" /> | ||
| </ItemGroup> | ||
|
|
||
| <Exec Command="command -v "$(CppLinker)"" IgnoreExitCode="true" StandardOutputImportance="Low"> | ||
| <PropertyGroup> | ||
| <_CommandProbe>command -v</_CommandProbe> | ||
| <_CommandProbe Condition="$([MSBuild]::IsOSPlatform('Windows'))">where</_CommandProbe> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is not used on Windows, right? (i.e. we don't support cross-OS publishing in cross build mode)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ran the above |
||
| </PropertyGroup> | ||
|
|
||
| <Exec Command="$(_CommandProbe) "$(CppLinker)"" IgnoreExitCode="true" StandardOutputImportance="Low"> | ||
| <Output TaskParameter="ExitCode" PropertyName="_WhereLinker" /> | ||
| </Exec> | ||
|
|
||
| <Exec Command="command -v "$(CppCompilerAndLinkerAlternative)"" Condition="'$(CppCompilerAndLinkerAlternative)' != '' and '$(_WhereLinker)' != '0'" IgnoreExitCode="true" StandardOutputImportance="Low"> | ||
| <Exec Command="$(_CommandProbe) "$(CppCompilerAndLinkerAlternative)"" Condition="'$(CppCompilerAndLinkerAlternative)' != '' and '$(_WhereLinker)' != '0'" IgnoreExitCode="true" StandardOutputImportance="Low"> | ||
| <Output TaskParameter="ExitCode" PropertyName="_WhereLinkerAlt" /> | ||
| </Exec> | ||
|
|
||
|
|
@@ -189,11 +195,11 @@ The .NET Foundation licenses this file to you under the MIT license. | |
| <_LinkerVersion>$([System.Text.RegularExpressions.Regex]::Match($(_LinkerVersionString), '[1-9]\d*'))</_LinkerVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Exec Command="command -v "$(ObjCopyName)"" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' != 'true' and '$(StripSymbols)' == 'true'"> | ||
| <Exec Command="$(_CommandProbe) "$(ObjCopyName)"" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' != 'true' and '$(StripSymbols)' == 'true'"> | ||
| <Output TaskParameter="ExitCode" PropertyName="_WhereSymbolStripper" /> | ||
| </Exec> | ||
|
|
||
| <Exec Command="command -v "$(ObjCopyNameAlternative)"" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' != 'true' and '$(ObjCopyNameAlternative)' != '' and '$(StripSymbols)' == 'true'"> | ||
| <Exec Command="$(_CommandProbe) "$(ObjCopyNameAlternative)"" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' != 'true' and '$(ObjCopyNameAlternative)' != '' and '$(StripSymbols)' == 'true'"> | ||
| <Output TaskParameter="ExitCode" PropertyName="_WhereSymbolStripperAlt" /> | ||
| </Exec> | ||
|
|
||
|
|
||
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.
If I am reading the correctly, uses of System.Net.Security.Native are not ifdefed out for linux-bionic in
runtime/src/libraries/System.Net.Security/src/System.Net.Security.csproj
Line 16 in 680043e
Do we need a matching fix in the libraries too?
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 don't know. Looking at the latest Bionic Mono build, we're not building this library there either so this can't be a NativeAOT specific problem, if it is a problem:
https://dnceng.visualstudio.com/7ea9116e-9fac-403d-b258-b31fcf1bb293/_apis/build/builds/2202215/logs/1188
I currently can't even test this enough to run a hello world so I'm not able to answer this question. It won't be much worse than Mono-Bionic.
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.
We may want to open an issue on it since it looks like a problem.
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.
Filed #87665. It looks like System.Net.Security tests are disabled on Bionic due to "Timeout on Helix, cannot repro locally".