Skip to content

Commit

Permalink
Switch coredistools to the dotnet/runtime plan (dotnet#612)
Browse files Browse the repository at this point in the history
Fixes dotnet#341.
  • Loading branch information
MichalStrehovsky authored Jan 31, 2021
1 parent 403495e commit fe57434
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public static string Disassemble(TargetArchitecture arch, byte[] bytes, Relocati
{
var sb = new StringBuilder();

#if TARGET_WINDOWS
// The coredistools library is not available in release builds because
// we don't want to ship yet another huge LLVM-based DLL.
#if DEBUG
Expand Down Expand Up @@ -61,9 +60,6 @@ public static string Disassemble(TargetArchitecture arch, byte[] bytes, Relocati
}
#else
sb.AppendLine("// CoreDisTools not available in release builds");
#endif
#else
sb.AppendLine("// CoreDisTools not available outside Windows");
#endif
return sb.ToString();
}
Expand Down
19 changes: 8 additions & 11 deletions src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,20 @@

<PropertyGroup>
<ILCompilerVersion>6.0.0-preview.1.21075.1</ILCompilerVersion>
<CoreDisToolsVersion>1.0.1-prerelease-00005</CoreDisToolsVersion>

<ObjWriterArtifactPath Condition="'$(TargetsWindows)' == 'true'">$(ArtifactsDir)llvm\build\bin\Release\$(LibPrefix)objwriter$(LibSuffix)</ObjWriterArtifactPath>
<ObjWriterArtifactPath Condition="'$(TargetsWindows)' != 'true'">$(ArtifactsDir)llvm\build\lib\$(LibPrefix)objwriter$(LibSuffix)</ObjWriterArtifactPath>

<!-- CoreDisTools are used in debugging visualizers. The package only exists on Windows -->
<IncludeCoreDisTools Condition="'$(TargetsWindows)' == 'true' and '$(Configuration)' != 'Release'">true</IncludeCoreDisTools>
<!-- CoreDisTools are used in debugging visualizers. -->
<IncludeCoreDisTools Condition="'$(Configuration)' != 'Release'">true</IncludeCoreDisTools>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(IncludeCoreDisTools)' == 'true'" />

<ItemGroup Condition="'$(TargetArchitecture)' != 'arm64'">
<PackageReference Condition="!Exists('$(ObjWriterArtifactPath)')" Include="Microsoft.DotNet.ILCompiler">
<Version>$(ILCompilerVersion)</Version>
</PackageReference>
<PackageReference Include="Microsoft.NetCore.CoreDisTools" Condition="'$(IncludeCoreDisTools)' == 'true'">
<Version>$(CoreDisToolsVersion)</Version>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' != 'arm64'">
Expand All @@ -64,11 +62,6 @@
<Pack>false</Pack>
</Content>

<Content Include="$(NuGetPackageRoot)runtime.$(ILCompilerRuntimeIdentifier).microsoft.netcore.coredistools\$(CoreDisToolsVersion)\runtimes\$(ILCompilerRuntimeIdentifier)\native\coredistools.dll" Condition="'$(IncludeCoreDisTools)' == 'true'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Pack>false</Pack>
</Content>
</ItemGroup>

<ItemGroup>
Expand All @@ -83,6 +76,10 @@
<Visible>false</Visible>
<Pack>false</Pack>
</Content>

<Content Include="$(CoreDisToolsLibrary)" Condition="Exists('$(CoreDisToolsLibrary)') and '$(IncludeCoreDisTools)' == 'true'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit fe57434

Please sign in to comment.