-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
source-build: bundle NativeAOT libraries with the SDK. #41198
Changes from 1 commit
ec9a3f1
3d1c224
713a6ff
cd188f3
71f5d98
7be0c03
22a593b
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 | ||
---|---|---|---|---|
|
@@ -202,6 +202,17 @@ | |||
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath> | ||||
</BundledLayoutPackage> | ||||
|
||||
<BundledLayoutPackage Include="MicrosoftDotNetILCompilerPackNupkg" Condition="'$(BundleNativeAotCompiler)' == 'true'"> | ||||
<PackageName>runtime.$(SharedFrameworkRid).Microsoft.DotNet.ILCompiler</PackageName> | ||||
<PackageVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</PackageVersion> | ||||
<TargetFramework>$(TargetFramework)</TargetFramework> | ||||
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath> | ||||
</BundledLayoutPackage> | ||||
|
||||
<BundledLayoutLibraryPackage Include="$(SourceBuiltShippingPackagesDir)/../runtime/Microsoft.DotNet.ILCompiler.$(MicrosoftNETCoreAppRuntimePackageVersion).nupkg" Condition="'$(BundleNativeAotCompiler)' == 'true'" /> | ||||
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.
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. Is it different than other runtime packs (apphost, corossgen2 etc.)? 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. These remain as The others are "restored" against a the target framework into the 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 think you want to add two FSharp and Roslyn do something similar but not when bundling the SDK but when publishing packages: Line 85 in dad1976
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. cc @MiYanni @dsplaisted @marcpopMSFT (owner of the bundling logic in sdk) 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. For now, I've added the
tmds marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
<BundledLayoutLibraryPackage Include="$(SourceBuiltShippingPackagesDir)/../runtime/Microsoft.NET.ILLink.Tasks.$(MicrosoftNETILLinkTasksPackageVersion).nupkg" Condition="'$(BundleNativeAotCompiler)' == 'true'" /> | ||||
|
||||
<BundledInstallerComponent Include="DownloadedRuntimeDepsInstallerFile" | ||||
Condition="('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') And '$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))"> | ||||
<BaseUrl>$(NetRuntimeRootUrl)</BaseUrl> | ||||
|
@@ -460,6 +471,11 @@ | |||
SkipUnchangedFiles="true" | ||||
/> | ||||
|
||||
<Copy SourceFiles="@(BundledLayoutLibraryPackage)" | ||||
ViktorHofer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
DestinationFolder="$(RedistLayoutPath)/library-packs" | ||||
SkipUnchangedFiles="true" | ||||
/> | ||||
|
||||
<!-- From Version.targets in SDK redist --> | ||||
<PropertyGroup> | ||||
<ArtifactNameSdk>dotnet-toolset-internal</ArtifactNameSdk> | ||||
|
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 want to make sure we are aware of what to expect)
This will only provide ILCompiler package for current RID. Note that PublishAot=true downloads separate ILCompiler packages when we issue
dotnet publish -p:PublishAot=true -r <some other rid>
(e.g.fedora-arm64
cross-publish on fedora-x64 system), in which case it will download the Microsoftlinux-arm64
package from nuget feed. If we don't like this behavior, then I think we have two options: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.
Yes, this is the behavior we want. We are enabling publishing for the SDK rid with a packed ILCompiler for that rid only. For other rids, the SDK will download a package from nuget.org.