Skip to content

Commit 5435aa8

Browse files
committedDec 2, 2022
Add KnownILCompilerPack entry to targetingpacks.targets
1 parent 03ee362 commit 5435aa8

File tree

5 files changed

+16
-19
lines changed

5 files changed

+16
-19
lines changed
 

‎docs/workflow/building/coreclr/nativeaot.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ For more advanced scenarios, look for at [Building the Tests](/docs/workflow/tes
101101

102102
### Running library tests
103103

104-
Build library tests by passing the `libs.tests` subset together with the `/p:TestNativeAot=true` to build the libraries, i.e. `clr.aot+libs+libs.tests /p:TestNativeAot=true` together with the full arguments as specified [above](#building). Then, to run a specific library, go to the tests directory of the library and run the usual command to run tests for the library (see [Running tests for a single library](/docs/workflow/testing/libraries/testing.md#running-tests-for-a-single-library)) but add the `/p:TestNativeAot=true` and the build configuration that was used, i.e. `dotnet.cmd build /t:Test /p:TestNativeAot=true -c Release`.
104+
Build library tests by passing the `libs.tests` subset together with the `/p:TestNativeAot=true` to build the libraries, i.e. `clr.runtime+clr.aot+host.native+libs+libs.tests /p:TestNativeAot=true` together with the full arguments as specified [above](#building). Then, to run a specific library, go to the tests directory of the library and run the usual command to run tests for the library (see [Running tests for a single library](/docs/workflow/testing/libraries/testing.md#running-tests-for-a-single-library)) but add the `/p:TestNativeAot=true` and the build configuration that was used, i.e. `dotnet.cmd build /t:Test /p:TestNativeAot=true -c Release`.
105105

106106
## Design Documentation
107107

‎eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
testGroup: innerloop
9494
isSingleFile: true
9595
nameSuffix: NativeAOT_Libs
96-
buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:ArchiveTests=true
96+
buildArgs: -s clr.runtime+clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:ArchiveTests=true
9797
timeoutInMinutes: 300 # doesn't normally take this long, but I've seen Helix queues backed up for 160 minutes
9898
# extra steps, run tests
9999
extraStepsTemplate: /eng/pipelines/libraries/helix.yml

‎eng/pipelines/runtime.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ extends:
203203
testGroup: innerloop
204204
timeoutInMinutes: 120
205205
nameSuffix: NativeAOT
206-
buildArgs: -s clr.aot+libs -rc $(_BuildConfig) -lc Release
206+
buildArgs: -s clr.runtime+clr.aot+host.native+libs -rc $(_BuildConfig) -lc Release
207207
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
208208
condition: >-
209209
or(
@@ -225,7 +225,7 @@ extends:
225225
testGroup: innerloop
226226
timeoutInMinutes: 120
227227
nameSuffix: NativeAOT
228-
buildArgs: -s clr.aot+libs -rc $(_BuildConfig) -lc Release
228+
buildArgs: -s clr.runtime+clr.aot+host.native+libs -rc $(_BuildConfig) -lc Release
229229
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
230230
condition: >-
231231
or(
@@ -249,7 +249,7 @@ extends:
249249
testGroup: innerloop
250250
timeoutInMinutes: 120
251251
nameSuffix: NativeAOT
252-
buildArgs: -s clr.aot+libs -rc $(_BuildConfig) -lc Release
252+
buildArgs: -s clr.runtime+clr.aot+host.native+libs -rc $(_BuildConfig) -lc Release
253253
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
254254
condition: >-
255255
or(
@@ -274,7 +274,7 @@ extends:
274274
testGroup: innerloop
275275
isSingleFile: true
276276
nameSuffix: NativeAOT
277-
buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true
277+
buildArgs: -s clr.runtime+clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true
278278
timeoutInMinutes: 240 # Doesn't actually take long, but we've seen the ARM64 Helix queue often get backlogged for 2+ hours
279279
# extra steps, run tests
280280
extraStepsTemplate: /eng/pipelines/libraries/helix.yml

‎eng/targetingpacks.targets

+10
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
Crossgen2PackVersion="$(ProductVersion)"
6161
Crossgen2RuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm;win-arm64;win-x86"
6262
Condition="'@(KnownCrossgen2Pack)' == '' or !@(KnownCrossgen2Pack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))" />
63+
<KnownILCompilerPack Include="Microsoft.DotNet.ILCompiler"
64+
ILCompilerPackNamePattern="runtime.**RID**.Microsoft.DotNet.ILCompiler"
65+
TargetFramework="$(NetCoreAppCurrent)"
66+
ILCompilerPackVersion="$(ProductVersion)"
67+
ILCompilerRuntimeIdentifiers="linux-musl-x64;linux-x64;win-x64;linux-arm;linux-arm64;linux-musl-arm;linux-musl-arm64;osx-arm64;osx-x64;win-arm;win-arm64;win-x86"
68+
Condition="'@(KnownILCompilerPack)' == '' or !@(KnownILCompilerPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))" />
6369
</ItemGroup>
6470

6571
<!-- Simple name references will be resolved from the targeting pack folders and should never be copied to the output. -->
@@ -98,6 +104,10 @@
98104
Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(LocalFrameworkOverrideName).Host'))" />
99105
<PackageReference Remove="@(PackageReference)"
100106
Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(LocalFrameworkOverrideName).Host'))" />
107+
<PackageDownload Remove="@(PackageDownload)"
108+
Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').EndsWith('Microsoft.DotNet.ILCompiler'))" />
109+
<PackageReference Remove="@(PackageReference)"
110+
Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').EndsWith('Microsoft.DotNet.ILCompiler'))" />
101111
</ItemGroup>
102112
</Target>
103113

‎eng/testing/linker/project.csproj.template

-13
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,4 @@
5656
IsImplicitlyDefined="true" />
5757
</ItemGroup>
5858

59-
<!-- Logic to prevent trying to restore an ILCompiler package for which there is no KnownILCompilerPack. -->
60-
<Target Name="PreventKnownILCompilerPackRestore" BeforeTargets="ProcessFrameworkReferences">
61-
<PropertyGroup>
62-
<PublishAot>false</PublishAot>
63-
</PropertyGroup>
64-
</Target>
65-
66-
<Target Name="ResetPublishAot" AfterTargets="ProcessFrameworkReferences">
67-
<PropertyGroup>
68-
<PublishAot>{PublishAot}</PublishAot>
69-
</PropertyGroup>
70-
</Target>
71-
7259
</Project>

0 commit comments

Comments
 (0)
Please sign in to comment.