[PATCH] D75648: [lld] Rename -flavor darwin to -flavor old-darwin
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 15:11:28 PST 2020
MaskRay created this revision.
MaskRay added reviewers: kledzik, lhames, ruiu.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.
@lhames agreed to remove the existing Mach-O port from lld
(https://reviews.llvm.org/D75382#1906108), but we should probably
continue keeping it until the new Mach-O port gets matured. The existing
Mach-O is also used by some downstream projects like Zig.
This patch is similar to rL253188 <https://reviews.llvm.org/rL253188> "Rename the gnu flavour to gnu old."
When the new Mach-O port gets matured, we can make a change similar to rL262158 <https://reviews.llvm.org/rL262158>: "Remove the old ELF linker."
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75648
Files:
lld/test/mach-o/usage.yaml
lld/tools/lld/lld.cpp
Index: lld/tools/lld/lld.cpp
===================================================================
--- lld/tools/lld/lld.cpp
+++ lld/tools/lld/lld.cpp
@@ -44,10 +44,10 @@
enum Flavor {
Invalid,
- Gnu, // -flavor gnu
- WinLink, // -flavor link
- Darwin, // -flavor darwin
- Wasm, // -flavor wasm
+ Gnu, // -flavor gnu
+ WinLink, // -flavor link
+ OldDarwin, // -flavor old-darwin
+ Wasm, // -flavor wasm
};
LLVM_ATTRIBUTE_NORETURN static void die(const Twine &s) {
@@ -60,7 +60,7 @@
.CasesLower("ld", "ld.lld", "gnu", Gnu)
.CasesLower("wasm", "ld-wasm", Wasm)
.CaseLower("link", WinLink)
- .CasesLower("ld64", "ld64.lld", "darwin", Darwin)
+ .CasesLower("ld64", "ld64.lld", "old-darwin", OldDarwin)
.Default(Invalid);
}
@@ -154,7 +154,7 @@
return !elf::link(args, canExitEarly(), llvm::outs(), llvm::errs());
case WinLink:
return !coff::link(args, canExitEarly(), llvm::outs(), llvm::errs());
- case Darwin:
+ case OldDarwin:
return !mach_o::link(args, canExitEarly(), llvm::outs(), llvm::errs());
case Wasm:
return !wasm::link(args, canExitEarly(), llvm::outs(), llvm::errs());
Index: lld/test/mach-o/usage.yaml
===================================================================
--- lld/test/mach-o/usage.yaml
+++ lld/test/mach-o/usage.yaml
@@ -1,4 +1,5 @@
# RUN: not ld64.lld | FileCheck %s
+# RUN: not lld -flavor old-darwin | FileCheck %s
#
# Test that running darwin linker with no option prints out usage message.
#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75648.248326.patch
Type: text/x-patch
Size: 1532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/3b8854c9/attachment.bin>
More information about the llvm-commits
mailing list