-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Move tools to use LKG ILC #107772
Open
agocke
wants to merge
22
commits into
dotnet:main
Choose a base branch
from
agocke:use-aot-lkg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+131
−307
Open
Move tools to use LKG ILC #107772
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e2500de
Move tools to use LKG ILC
agocke cf9e021
Remove more properties set centrally.
agocke 23814ac
Remove crossgen2_inbuild and use main project
agocke 55b59d5
Keep cross-arch configuration
agocke 6991193
Re-introduce publish projects
agocke 8d56351
Refactor and add crossarch to clr.tools
agocke 691a4dc
Remove NativeAotSupported condition for crossgen2 crossarch
agocke da3f86c
Force non-crossarch crossgen to use buildarch
agocke db46f33
Use crossarch when cross building and publish when local
agocke 87489cc
Only use cross-crossgen when crossbuilding
agocke 9fa5a66
Typo
agocke 6529d3e
crossgen-corelib should prefer ILC'd crossgen
agocke 7299cd1
Always build and use crossgen2_inbuild
agocke b78ace9
Keep apphost skip
agocke 549a505
Use inbuild for runtime pack
agocke 57aa6cd
Skip armel and riscv64
agocke db94fc6
PR comments
agocke ef1ed17
Use native aot as a proxy for official support
agocke b0dc636
Move project back in subsets
agocke 9bc204d
Remove old crossarch project
agocke ce83ff1
Revert "Remove old crossarch project"
agocke eda26e4
Rename to inbuild
agocke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<Project> | ||
<!-- Settings for tools that publish as AOT --> | ||
|
||
<PropertyGroup Condition="'$(AotOrSingleFile)' == 'true' and '$(UseNativeAotForComponents)' == 'true'"> | ||
<PublishAot>true</PublishAot> | ||
<!-- Use .dwarf files instead of .dsym files since our symbol exporting may not safely handle folders. --> | ||
<NativeSymbolExt Condition="'$(_IsApplePlatform)' == 'true'">.dwarf</NativeSymbolExt> | ||
<DsymUtilOptions Condition="'$(_IsApplePlatform)' == 'true'">--flat</DsymUtilOptions> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(AotOrSingleFile)' == 'true' and '$(UseNativeAotForComponents)' != 'true'"> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<PublishReadyToRun>true</PublishReadyToRun> | ||
<!-- Disable crossgen on NetBSD, illumos, Solaris, and Haiku for now. This can be revisited when we have full support. --> | ||
<PublishReadyToRun Condition="'$(TargetOS)' == 'netbsd' Or '$(TargetOS)' == 'illumos' Or '$(TargetOS)' == 'solaris' Or '$(TargetOS)' == 'haiku'">false</PublishReadyToRun> | ||
<!-- Disable crossgen on FreeBSD when cross building from Linux. --> | ||
<PublishReadyToRun Condition="'$(TargetOS)' == 'freebsd' and '$(CrossBuild)' == 'true'">false</PublishReadyToRun> | ||
<PublishReadyToRunComposite>$(PublishReadyToRun)</PublishReadyToRunComposite> | ||
</PropertyGroup> | ||
|
||
<!-- Allow overriding the LKG ILCompiler package with a specific version. --> | ||
<PropertyGroup Condition="'$(UseNativeAotForComponents)' == 'true' and '$(PublishAot)' == 'true' and '$(MicrosoftDotNetILCompilerVersion)' != ''"> | ||
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(UseNativeAotForComponents)' == 'true' and '$(PublishAot)' == 'true' and '$(MicrosoftDotNetILCompilerVersion)' != ''"> | ||
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" /> | ||
<PackageReference Include="runtime.$(ToolsRID).Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" /> | ||
</ItemGroup> | ||
|
||
<!-- Needed for the amd64 -> amd64 musl cross-build to pass the target flag. --> | ||
<Target Name="_FixIlcTargetTriple" | ||
AfterTargets="SetupOSSpecificProps" | ||
Condition="'$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'"> | ||
<!-- Compute CrossCompileRid, and copy the downstream logic as-is. --> | ||
<PropertyGroup> | ||
<CrossCompileRid>$(RuntimeIdentifier)</CrossCompileRid> | ||
|
||
<CrossCompileArch /> | ||
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-x64'))">x86_64</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> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<LinkerArg Include="--target=$(TargetTriple)" Condition="'$(TargetOS)' != 'osx' and '$(TargetTriple)' != ''" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<ItemGroup Condition="'$(NativeAotSupported)' == 'true'"> | ||
<CustomLinkerArg Condition="'$(CrossBuild)' == 'true' and '$(_hostArchitecture)' == '$(_targetArchitecture)' and '$(_hostOS)' != 'windows'" Include="--gcc-toolchain=$(ROOTFS_DIR)/usr" /> | ||
</ItemGroup> | ||
|
||
<Target Name="LocateNativeCompiler" | ||
Condition="'$(UseNativeAotForComponents)' == 'true' and '$(HostOS)' != 'windows'" | ||
BeforeTargets="SetupOSSpecificProps"> | ||
<PropertyGroup> | ||
<CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">clang</CppCompilerAndLinker> | ||
</PropertyGroup> | ||
|
||
<Exec Command="sh -c 'build_arch="$(TargetArchitecture)" compiler="$(CppCompilerAndLinker)" . "$(RepositoryEngineeringDir)/common/native/init-compiler.sh" && echo "$CC;$LDFLAGS"' 2>/dev/null" | ||
EchoOff="true" | ||
ConsoleToMsBuild="true" | ||
StandardOutputImportance="Low"> | ||
<Output TaskParameter="ConsoleOutput" PropertyName="_CC_LDFLAGS" /> | ||
</Exec> | ||
|
||
<PropertyGroup> | ||
<CppLinker>$(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))</CppLinker> | ||
<_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))</_LDFLAGS> | ||
<LinkerFlavor Condition="$(_LDFLAGS.Contains('lld'))">lld</LinkerFlavor> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
<!-- Cross-build settings --> | ||
<PropertyGroup> | ||
<LinkerFlavor Condition="'$(CrossBuild)' == 'true' and '$(TargetsLinux)' == 'true'">lld</LinkerFlavor> | ||
<SysRoot Condition="'$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
A few questions:
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
(i.e.packs
subset), do we need this condition there?NativeAotSupported
is false; i.e. main publishes crossgen2, while PR doesn't.. until the "later PR" is on the horizon, right?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.
(1) No, just accidental due to moving things around
(2) I don't think it needs to be