[PATCH] D11737: Add -linker (and -linker=) alias for -fuse-ld=

Filipe Cabecinhas via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 18:14:44 PDT 2015


filcab abandoned this revision.
filcab added a comment.

We don't need this anymore, since we're making some internal changes.
Thank you for the feedback!


================
Comment at: include/clang/Driver/Options.td:1853-1854
@@ -1853,1 +1852,4 @@
+def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, HelpText<"Use linker <name>">, Group<f_Group>;
+def linker : Separate<["-"], "linker">, Alias<fuse_ld_EQ>, MetaVarName<"<name>">;
+def linker_EQ : Joined<["-"], "linker=">, Alias<fuse_ld_EQ>;
 
----------------
echristo wrote:
> Any reason to have both options?
I went and double-checked our docs. We should only need one.

================
Comment at: include/clang/Driver/Options.td:1853
@@ -1853,1 +1852,3 @@
+def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, HelpText<"Use linker <name>">, Group<f_Group>;
+def linker_EQ : Joined<["-"], "linker=">, Alias<fuse_ld_EQ>, MetaVarName<"<name>">;
 
----------------
echristo wrote:
> thakis wrote:
> > Any reason to have another alias for this at all? Does gcc understand this spelling? If not, could you limit this flag to PS4 targets? (I'm guessing you need it for PS4 targets for some reason.)
> Any reason? (And I'm not sure how to limit it btw on target).
Same here, no idea how to limit the flag to a specific target.

================
Comment at: test/Driver/fuse-ld.c:27-33
@@ -26,1 +26,9 @@
 
+// -linker= is an alias to fuse-ld. Don't need to retry all combinations
+// RUN: %clang %s -### -linker gold \
+// RUN:     --sysroot=%S/Inputs/basic_freebsd_tree \
+// RUN:     -target x86_64-unknown-freebsd \
+// RUN:     -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
+// RUN:   | FileCheck %s -check-prefix=CHECK-FREEBSD-GOLD
+// CHECK-FREEBSD-LINKER-GOLD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.gold
+
----------------
echristo wrote:
> Bet this doesn't work :)
Derp. Sorry.

================
Comment at: test/Driver/fuse-ld.c:32-33
@@ +31,4 @@
+// RUN:     -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
+// RUN:   | FileCheck %s -check-prefix=CHECK-FREEBSD-GOLD
+// CHECK-FREEBSD-LINKER-GOLD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.gold
+
----------------
pcc wrote:
> Prefix mismatch here.
Ah yes. Thanks!


http://reviews.llvm.org/D11737





More information about the cfe-commits mailing list