[PATCH] D11737: Add -linker (and -linker=) alias for -fuse-ld=
Filipe Cabecinhas via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 10 11:16:31 PDT 2015
filcab updated this revision to Diff 31693.
filcab added a comment.
Update to latest trunk. Ping.
http://reviews.llvm.org/D11737
Files:
include/clang/Driver/Options.td
test/Driver/fuse-ld.c
Index: test/Driver/fuse-ld.c
===================================================================
--- test/Driver/fuse-ld.c
+++ test/Driver/fuse-ld.c
@@ -24,6 +24,20 @@
// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-PLIB
// CHECK-FREEBSD-PLIB: error: invalid linker name
+// -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
+
+// 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-LINKEREQ-GOLD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.gold
// RUN: %clang %s -### \
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -1849,7 +1849,9 @@
def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<clang_ignored_gcc_optimization_f_Group>;
-def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>;
+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>;
defm align_functions : BooleanFFlag<"align-functions">, Group<clang_ignored_gcc_optimization_f_Group>;
def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<clang_ignored_gcc_optimization_f_Group>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11737.31693.patch
Type: text/x-patch
Size: 1882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150810/43e68e5e/attachment.bin>
More information about the cfe-commits
mailing list