-
Notifications
You must be signed in to change notification settings - Fork 206
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
NativeAOT-LLVM: Reinstate SingleEntry.targets #2248
NativeAOT-LLVM: Reinstate SingleEntry.targets #2248
Conversation
Call ResolvePackageDependencies to get PackageDefinitions
f12b8bb
to
58e71f5
Compare
Cc @dotnet/nativeaot-llvm |
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.
This should fix #2235. cc @kant2002
Looks good to me. @SingleAccretion Any additional feedback?
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 should add a note somewhere in the user-facing documentation that PublishAot=true
is not supported.
<PropertyGroup Condition="'$(TargetArchitecture)' == 'wasm'"> | ||
<NeedNativePublishSupportForLLVM>true</NeedNativePublishSupportForLLVM> | ||
</PropertyGroup> |
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.
NeedNativePublishSupportForSDK6
will be deleted in dotnet/runtime#82568 at which point this will conflict a lot...
I think we should just unconditionally override ImportRuntimeIlcPackageTarget
:
<!-- NativeAOT-LLVM: override ImportRuntimeIlcPackageTarget to not depend on the SDK-provided ResolvedILCompilerPack item -->
<PropertyGroup>
<!-- EmitLegacyAssetsFileItems tells the SDK to generate PackageDefinitions -->
<EmitLegacyAssetsFileItems>true</EmitLegacyAssetsFileItems>
</PropertyGroup>
<Target Name="ImportRuntimeIlcPackageTarget" Condition="'$(BuildingFrameworkLibrary)' != 'true'" DependsOnTargets="$(ImportRuntimeIlcPackageTargetDependsOn)" BeforeTargets="Publish">
<Error Condition="'@(PackageDefinitions)' == ''" Text="The PackageDefinitions ItemGroup is required for target ImportRuntimeIlcPackageTarget" />
<PropertyGroup>
<RuntimePackagePath Condition="'%(PackageDefinitions.Name)' == '$(RuntimeIlcPackageName)'">%(PackageDefinitions.ResolvedPath)</RuntimePackagePath>
<IlcHostPackagePath Condition="'%(PackageDefinitions.Name)' == '$(IlcHostPackageName)'">%(PackageDefinitions.ResolvedPath)</IlcHostPackagePath>
</PropertyGroup>
</Target>
Before importing Microsoft.NETCore.Native.targets
.
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.
Thanks, have tried that and looks simpler.
This PR, adds back
SingleEntry.targets
tosrc\coreclr\nativeaot\BuildIntegration\Microsoft.DotNet.ILCompiler.LLVM.targets
and basically copies part of what wasNeedNativePublishSupportForSDK6
toNeedNativePublishSupportForLLVM
. It also adds a call toResolvePackageDependencies
to getPackageDefinitions
set.Minor version update to the docs.
As I've replaced
NeedNativePublishSupportForSDK6
I'm basically saying we are not supporting .net SDK 6.Hopefully this will fix
dotnet publish --self-contained -r browser-wasm
, it does so locally: