Skip to content

Commit

Permalink
Remove ILCompiler package reference (dotnet#107583)
Browse files Browse the repository at this point in the history
It doesn't look like we need the newest version of the package
anymore. This configuration (using the package instead of the SDK version)
can be dangerous because it causes a split between the version built
against vs. the version AOT'd against.
  • Loading branch information
agocke committed Sep 12, 2024
1 parent a833cfb commit d62199d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
4 changes: 0 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,6 @@
<Sha>7cb32e193a55a95c74fc3bd56501b951b48b700f</Sha>
<SourceBuild RepoName="runtime" ManagedOnly="false" />
</Dependency>
<Dependency Name="Microsoft.DotNet.ILCompiler" Version="9.0.0-rc.1.24410.5">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>7cb32e193a55a95c74fc3bd56501b951b48b700f</Sha>
</Dependency>
<Dependency Name="System.Reflection.Metadata" Version="9.0.0-rc.1.24410.5">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>7cb32e193a55a95c74fc3bd56501b951b48b700f</Sha>
Expand Down
2 changes: 0 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@
<MicrosoftPrivateIntellisenseVersion>8.0.0-preview-20230918.1</MicrosoftPrivateIntellisenseVersion>
<!-- Mono Cecil -->
<MicrosoftDotNetCecilVersion>0.11.5-alpha.24460.1</MicrosoftDotNetCecilVersion>
<!-- ILCompiler -->
<MicrosoftDotNetILCompilerVersion>9.0.0-rc.1.24410.5</MicrosoftDotNetILCompilerVersion>
<!-- ICU -->
<MicrosoftNETCoreRuntimeICUTransportVersion>10.0.0-alpha.1.24459.2</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- MsQuic -->
Expand Down
9 changes: 9 additions & 0 deletions eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@
<SingleFileHostSourcePath>$([MSBuild]::NormalizePath('$(CoreCLRArtifactsPath)', 'corehost', 'singlefilehost$(ExeSuffix)'))</SingleFileHostSourcePath>
</PropertyGroup>

<!-- Not a live build, but 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>

<Target Name="ResolveRuntimeFilesFromLocalBuild">
<Error Condition="!Exists('$(CoreCLRArtifactsPath)') and '$(RuntimeFlavor)' == 'CoreCLR'"
Text="The CoreCLR artifacts path does not exist '$(CoreCLRArtifactsPath)'. The 'clr' subset must be built before building this project. Configuration: '$(CoreCLRConfiguration)'. To use a different configuration, specify the 'RuntimeConfiguration' property." />
Expand Down
6 changes: 0 additions & 6 deletions src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
<PublishReadyToRun Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishReadyToRun>
<PublishSingleFile Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishSingleFile>
<PublishTrimmed Condition="'$(UseNativeAotForComponents)' != 'true'">true</PublishTrimmed>
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
</PropertyGroup>

<ItemGroup Condition="'$(UseNativeAotForComponents)' == 'true'">
<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"
Expand Down
6 changes: 0 additions & 6 deletions src/native/managed/native-library.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
the same way as eng/native/functions.cmake strip_symbols
-->
<StripSymbols>false</StripSymbols>
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
<ControlFlowGuard>Guard</ControlFlowGuard>
</PropertyGroup>

Expand Down Expand Up @@ -34,9 +33,4 @@
<!-- passed by compile-native.proj to set - -gcc-toolchain=$(ROOTFS_DIR)/usr -->
<CustomLinkerArg Condition="'$(CustomLinkerArgToolchainArg)' != ''" Include="$(CustomLinkerArgToolchainArg)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" />
<PackageReference Include="runtime.$(ToolsRID).Microsoft.DotNet.ILCompiler" Version="$(MicrosoftDotNetILCompilerVersion)" />
</ItemGroup>
</Project>

0 comments on commit d62199d

Please sign in to comment.