[PATCH] D152929: [lld-macho] Switch to new tool ID

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 09:40:30 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG806f5b301966: [lld-macho] Switch to new tool ID (authored by keith).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152929/new/

https://reviews.llvm.org/D152929

Files:
  lld/MachO/Writer.cpp
  lld/test/MachO/lc-build-version.s
  llvm/include/llvm/BinaryFormat/MachO.h
  llvm/include/llvm/Object/MachO.h


Index: llvm/include/llvm/Object/MachO.h
===================================================================
--- llvm/include/llvm/Object/MachO.h
+++ llvm/include/llvm/Object/MachO.h
@@ -807,6 +807,8 @@
     case MachO::TOOL_CLANG: return "clang";
     case MachO::TOOL_SWIFT: return "swift";
     case MachO::TOOL_LD: return "ld";
+    case MachO::TOOL_LLD:
+      return "lld";
     default:
       std::string ret;
       raw_string_ostream ss(ret);
Index: llvm/include/llvm/BinaryFormat/MachO.h
===================================================================
--- llvm/include/llvm/BinaryFormat/MachO.h
+++ llvm/include/llvm/BinaryFormat/MachO.h
@@ -511,7 +511,7 @@
 };
 
 // Values for tools enum in build_tool_version.
-enum { TOOL_CLANG = 1, TOOL_SWIFT = 2, TOOL_LD = 3 };
+enum { TOOL_CLANG = 1, TOOL_SWIFT = 2, TOOL_LD = 3, TOOL_LLD = 4 };
 
 // Structs from <mach-o/loader.h>
 
Index: lld/test/MachO/lc-build-version.s
===================================================================
--- lld/test/MachO/lc-build-version.s
+++ lld/test/MachO/lc-build-version.s
@@ -11,7 +11,7 @@
 # MACOS-10-14-NEXT: sdk 10.15
 # MACOS-10-14-NEXT: minos 10.14
 # MACOS-10-14-NEXT: ntools 1
-# MACOS-10-14-NEXT: tool ld
+# MACOS-10-14-NEXT: tool lld
 # MACOS-10-14-NEXT: version {{[0-9\.]+}}
 
 # RUN: %lld -platform_version macos 10.13 10.15 -o %t.macos-10-13 %t.o
Index: lld/MachO/Writer.cpp
===================================================================
--- lld/MachO/Writer.cpp
+++ lld/MachO/Writer.cpp
@@ -495,7 +495,7 @@
 
     c->ntools = ntools;
     auto *t = reinterpret_cast<build_tool_version *>(&c[1]);
-    t->tool = TOOL_LD;
+    t->tool = TOOL_LLD;
     t->version = encodeVersion(VersionTuple(
         LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR, LLVM_VERSION_PATCH));
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152929.531797.patch
Type: text/x-patch
Size: 1788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/0b083b00/attachment.bin>


More information about the llvm-commits mailing list