Remove notions of the buildtools and the GetModuleIndex
authorJan Vorlicek <janvorli@microsoft.com>
Wed, 15 Apr 2020 21:16:58 +0000 (23:16 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 20 Apr 2020 13:10:03 +0000 (06:10 -0700)
eng/Subsets.props
eng/pipelines/coreclr/templates/build-job.yml
src/coreclr/CMakeLists.txt
src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.cs [deleted file]
src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.csproj [deleted file]

index 794113a1082aa5542c5672abdb21c3404a3ad0a8..60df57613370970c616c4a403f54d87f2d60ed05 100644 (file)
@@ -55,7 +55,7 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <DefaultCoreClrSubsets>clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.buildtools+clr.packages</DefaultCoreClrSubsets>
+    <DefaultCoreClrSubsets>clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.packages</DefaultCoreClrSubsets>
 
     <DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
     <DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib</DefaultMonoSubsets>
@@ -85,7 +85,6 @@
     <SubsetName Include="Clr.CoreLib" Description="The managed System.Private.CoreLib library for CoreCLR." />
     <SubsetName Include="Clr.NativeCoreLib" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." />
     <SubsetName Include="Clr.Tools" Description="Managed tools that support CoreCLR development and testing." />
-    <SubsetName Include="Clr.BuildTools" Description="Tools needed for the native CoreCLR build." />
     <SubsetName Include="Clr.Packages" Description="The projects that produce NuGet packages for the CoreCLR runtime, crossgen, and IL tools." />
 
     <!-- Mono -->
   </ItemDefinitionGroup>
 
   <!-- CoreClr sets -->
-  <ItemGroup Condition="$(_subset.Contains('+clr.buildtools+'))">
-    <CoreClrProject Include="$(CoreClrProjectRoot)src\tools\GetModuleIndex\GetModuleIndex.csproj" />
-  </ItemGroup>
-
   <ItemGroup Condition="$(_subset.Contains('+clr.corelib+'))">
     <CoreClrProject Include="$(CoreClrProjectRoot)src\System.Private.CoreLib\System.Private.CoreLib.csproj" />
   </ItemGroup>
index b343975a710b5307580511b8ad65916845cdee3e..50dcfe9901fc1753776612774bd632cb76cf3547 100644 (file)
@@ -122,10 +122,6 @@ jobs:
     - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
       - template: /eng/pipelines/common/restore-internal-tools.yml
 
-    # Build CoreCLR tools needed by the native runtime build
-    - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.buildtools $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci /bl:$(Build.SourcesDirectory)/artifacts/log/clr.buildtools.binlog
-      displayName: Build CoreCLR Diagnostic Tools
-
     # Build CoreCLR Runtime
     - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
       - script: $(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) -ci $(compilerArg) $(officialBuildIdArg)
index 5fa572c4fcdf9c03f059c21b621bd4f2987cc915..efad61086e853d90372e075588287b9be80e56c9 100644 (file)
@@ -25,12 +25,6 @@ set(GENERATED_EVENTING_DIR ${CMAKE_CURRENT_BINARY_DIR}/Eventing)
 set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.c")
 set(PAL_REDEFINES_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/dlls/mscordac/palredefines.S)
 
-if(CLR_CMAKE_HOST_UNIX)
-    set(CLR_DOTNET_COMMAND ${CLR_REPO_ROOT_DIR}/dotnet.sh)
-elseif(CLR_CMAKE_HOST_WIN32)
-    set(CLR_DOTNET_COMMAND ${CLR_REPO_ROOT_DIR}/dotnet.cmd)
-endif(CLR_CMAKE_HOST_UNIX)
-
 # Avoid logging when skipping up-to-date copies
 set(CMAKE_INSTALL_MESSAGE LAZY)
 
diff --git a/src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.cs b/src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.cs
deleted file mode 100644 (file)
index 93b9adb..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-using System;
-using System.IO;
-using System.Linq;
-using System.Runtime.InteropServices;
-using Microsoft.FileFormats;
-using Microsoft.FileFormats.ELF;
-using Microsoft.FileFormats.MachO;
-using Microsoft.FileFormats.PE;
-
-public class GetModuleIndex
-{
-    public static int Main(string[] args)
-    {
-        if (args.Length < 2 || string.IsNullOrEmpty(args[0]) || string.IsNullOrEmpty(args[1]))
-        {
-            throw new ArgumentException("Invalid command line arguments");
-        }
-        string moduleFileName = args[0];
-        string outputFileName = args[1];
-
-        using (FileStream stream = File.OpenRead(moduleFileName))
-        {
-            if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
-            {
-                var elfFile = new ELFFile(new StreamAddressSpace(stream));
-                byte[] buildId = elfFile.BuildID;
-                if (buildId != null)
-                {
-                    // First byte is the number of bytes total in the build id
-                    string outputText = string.Format("0x{0:x2}, {1}", buildId.Length, ToHexString(buildId));
-                    File.WriteAllText(outputFileName, outputText);
-                }
-                else
-                {
-                    throw new BadInputFormatException($"{moduleFileName} does not have a build id");
-                }
-            }
-            else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
-            {
-                var peFile = new PEFile(new StreamAddressSpace(stream));
-                // First byte is the number of bytes total in the index
-                string outputText = string.Format("0x{0:x2}, {1} {2}", 8, ToHexString(peFile.Timestamp), ToHexString(peFile.SizeOfImage));
-                File.WriteAllText(outputFileName, outputText);
-            }
-            else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
-            {
-                var machoFile = new MachOFile(new StreamAddressSpace(stream));
-                byte[] uuid = machoFile.Uuid;
-                if (uuid != null)
-                {
-                    // First byte is the number of bytes total in the build id
-                    string outputText = string.Format("0x{0:x2}, {1}", uuid.Length, ToHexString(uuid));
-                    File.WriteAllText(outputFileName, outputText);
-                }
-                else
-                {
-                    throw new BadInputFormatException($"{moduleFileName} does not have a uuid");
-                }
-            }
-            else
-            {
-                throw new PlatformNotSupportedException(RuntimeInformation.OSDescription);
-            }
-        }
-        return 0;
-    }
-
-    private static string ToHexString(uint value)
-    {
-        return ToHexString(BitConverter.GetBytes(value));
-    }
-
-    private static string ToHexString(byte[] bytes)
-    {
-        return string.Concat(bytes.Select(b => string.Format("0x{0:x2}, ", b)));
-    }
-}
diff --git a/src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.csproj b/src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.csproj
deleted file mode 100644 (file)
index addf68e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <PlatformTarget>AnyCpu</PlatformTarget>
-    <OutputType>Exe</OutputType>
-    <TargetFramework>netcoreapp5.0</TargetFramework>
-    <UseAppHost>false</UseAppHost>
-    <OutputPath>$(BinDir)/GetModuleIndex</OutputPath>
-  </PropertyGroup>
-  
-  <ItemGroup>
-    <PackageReference Include="Microsoft.FileFormats">
-      <Version>$(MicrosoftFileFormatsVersion)</Version>
-    </PackageReference>
-  </ItemGroup>
-</Project>