From: Jan Vorlicek Date: Wed, 15 Apr 2020 21:16:58 +0000 (+0200) Subject: Remove notions of the buildtools and the GetModuleIndex X-Git-Tag: submit/tizen/20210909.063632~8474^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59eddef2f5754cd5547e7dad47d5ce2245ffda96;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove notions of the buildtools and the GetModuleIndex --- diff --git a/eng/Subsets.props b/eng/Subsets.props index 794113a1082..60df5761337 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -55,7 +55,7 @@ - clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.buildtools+clr.packages + clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.packages mono.llvm+ $(DefaultMonoSubsets)mono.runtime+mono.corelib @@ -85,7 +85,6 @@ - @@ -146,10 +145,6 @@ - - - - diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index b343975a710..50dcfe9901f 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -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) diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index 5fa572c4fcd..efad61086e8 100644 --- a/src/coreclr/CMakeLists.txt +++ b/src/coreclr/CMakeLists.txt @@ -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 index 93b9adb6796..00000000000 --- a/src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.cs +++ /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 index addf68e7c33..00000000000 --- a/src/coreclr/src/tools/GetModuleIndex/GetModuleIndex.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - AnyCpu - Exe - netcoreapp5.0 - false - $(BinDir)/GetModuleIndex - - - - - $(MicrosoftFileFormatsVersion) - - -