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

Use live apphost when publishing ilc as singlefile #105004

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8e244d6
Use live apphost when publishing ilc as singlefile
am11 Jul 17, 2024
93c6d88
Block ILCompiler.csproj build on mobile
am11 Jul 17, 2024
b00efad
Invert condition
am11 Jul 17, 2024
351856c
Limit the scope of build order
am11 Aug 29, 2024
46b01fd
Merge branch 'main' into feature/freebsd-port/outputrid
am11 Sep 2, 2024
b90b7fd
Merge branch 'main' into feature/freebsd-port/outputrid
am11 Sep 12, 2024
97a0686
Address CR feedback
am11 Sep 13, 2024
5d7dba3
Merge dotnet/main into feature/freebsd-port/outputrid
am11 Sep 13, 2024
d46a6fd
Update src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
am11 Sep 13, 2024
713e9ec
Update RID
am11 Sep 13, 2024
8be0a6a
Use first step in CI (for now)
am11 Sep 13, 2024
4684361
Add postBuildSteps for step 2
am11 Sep 13, 2024
e5471c8
Merge branch 'main' into feature/freebsd-port/outputrid
am11 Sep 13, 2024
5903321
fix
am11 Sep 13, 2024
1b81367
Revert to old main
am11 Dec 18, 2024
ea14512
Merge dotnet/main into feature/freebsd-port/outputrid
am11 Dec 18, 2024
2da74d3
Add multi-stages for community supported platforms
am11 Dec 18, 2024
e096e4a
Apply suggestions from code review
am11 Dec 19, 2024
1b9948c
Update toolAot.targets
am11 Dec 19, 2024
8d81ab4
Revert experiment
am11 Dec 19, 2024
a59b66a
Merge branch 'main' into feature/freebsd-port/outputrid
am11 Jan 8, 2025
fc810a3
Replace hardcoded platform arg
am11 Jan 9, 2025
e2344a9
Try with UseNativeAotForComponents=true
am11 Jan 9, 2025
d376752
Apply condition on versino directly
am11 Jan 9, 2025
ba71b35
Remove over-defensive condition
am11 Jan 9, 2025
4b0df9f
Revert UseNativeAotForComponents change
am11 Jan 9, 2025
bd6549a
Merge branch 'main' into feature/freebsd-port/outputrid
am11 Jan 9, 2025
011280d
Enable NativeAot runtime build on riscv64
am11 Jan 9, 2025
8acadc6
Merge branch 'main' into feature/freebsd-port/outputrid
am11 Jan 11, 2025
c414e93
Update Subsets.props
am11 Jan 11, 2025
6c2c4e7
merge conflicts..
am11 Jan 12, 2025
df0f9b3
Merge branch 'main' into feature/freebsd-port/outputrid
am11 Jan 12, 2025
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
5 changes: 4 additions & 1 deletion eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,11 @@ extends:
jobParameters:
testScope: innerloop
nameSuffix: CoreCLR
buildArgs: -s clr+libs+host+packs -c $(_BuildConfig) -rc Checked
buildArgs: -s clr+libs+host+packs -c $(_BuildConfig) -rc Checked -p:NativeAotSupported=false
am11 marked this conversation as resolved.
Show resolved Hide resolved
timeoutInMinutes: 120
postBuildSteps:
- script: $(Build.SourcesDirectory)/build$(scriptExt) ${{ variables.debugOnPrReleaseOnRolling }} -s clr.tools+packs -c $(_BuildConfig) -rc Checked -cross -os freebsd
displayName: Build clr.tools and packs
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
Expand Down
22 changes: 8 additions & 14 deletions src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputPath>$(RuntimeBinDir)ilc/</OutputPath>
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(_IsPublishing)' != 'true'">$(PackageRID)</RuntimeIdentifier>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the _IsPublishing property set?

@agocke's comment #107772 (comment) makes it sound like the _IsPublishing is not set as expected in this project.

Copy link
Member

@agocke agocke Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now the dotnet CLI sets _IsPublishing when running dotnet publish but it's everyone else's responsibility to set it when running the Publish target (I don't like this behavior, fyi). As far as I can tell, ILCompiler doesn't guarantee this is set, currently.

<RuntimeIdentifier Condition="'$(_IsPublishing)' == 'true'">$(OutputRID)</RuntimeIdentifier>
<UseLocalTargetingRuntimePack Condition="'$(UseNativeAotForComponents)' != 'true' and '$(CrossBuild)' == 'true' and '$(TargetOS)' != '$(HostOS)' and '$(TargetsMobile)' != 'true'">true</UseLocalTargetingRuntimePack>
</PropertyGroup>

<Import Project="ILCompiler.props" />
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(UseLocalTargetingRuntimePack)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" Condition="'$(UseLocalTargetingRuntimePack)' == 'true'" />

<Import Project="ILCompiler.props" />

<!-- BEGIN: Workaround for https://github.com/dotnet/runtime/issues/67742 -->
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
<PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir>
<PublishAot Condition="'$(UseNativeAotForComponents)' == 'true'">true</PublishAot>
<SysRoot Condition="'$(UseNativeAotForComponents)' == 'true' and '$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot>
<PublishReadyToRun Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishReadyToRun>
<PublishReadyToRun Condition="'$(UseNativeAotForComponents)' != 'true' and '$(UseLocalTargetingRuntimePack)' != 'true'">true</PublishReadyToRun>
<PublishSingleFile Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishSingleFile>
<PublishTrimmed Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishTrimmed>
</PropertyGroup>
Expand Down Expand Up @@ -82,15 +85,6 @@
<Target Name="PublishCompiler"
am11 marked this conversation as resolved.
Show resolved Hide resolved
Condition="'$(BuildingInsideVisualStudio)' != 'true'"
AfterTargets="Build"
DependsOnTargets="Publish;StompSingleFileHostPath" />
DependsOnTargets="Publish" />

<!-- HACK: liveBuilds stomps over SingleFileHostSourcePath, setting it to the host that we just built.
That's unfortunate because it's not the host we're supposed to use here. -->
<Target Name="StompSingleFileHostPath"
BeforeTargets="ResolveFrameworkReferences">
<PropertyGroup>
<SingleFileHostSourcePath></SingleFileHostSourcePath>
</PropertyGroup>
</Target>
<!-- END: Workaround for https://github.com/dotnet/runtime/issues/67742 -->
am11 marked this conversation as resolved.
Show resolved Hide resolved
</Project>
2 changes: 1 addition & 1 deletion src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<PublishTrimmed>true</PublishTrimmed>
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
<RuntimeIdentifier>$(OutputRID)</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<UseLocalAppHostPack>true</UseLocalAppHostPack>
Expand Down
4 changes: 3 additions & 1 deletion src/installer/pkg/projects/netcoreappRIDs.props
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
built during official builds, however we wish to include them
in our runtime.json to enable others to provide them. -->
<UnofficialBuildRID Include="freebsd-x64" />
<UnofficialBuildRID Include="freebsd-arm64" />
<UnofficialBuildRID Include="freebsd-arm64">
<Platform>arm64</Platform>
</UnofficialBuildRID>
<UnofficialBuildRID Include="tizen.4.0.0-armel">
<Platform>armel</Platform>
</UnofficialBuildRID>
Expand Down