[PATCH] D11737: Add -linker (and -linker=) alias for -fuse-ld=
Filipe Cabecinhas via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 25 10:14:09 PDT 2015
filcab updated this revision to Diff 33085.
filcab marked 3 inline comments as done.
filcab added a comment.
Addressed comments.
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,13 @@
// 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-LINKEREQ-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,8 @@
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_EQ : Joined<["-"], "linker=">, Alias<fuse_ld_EQ>, MetaVarName<"<name>">;
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.33085.patch
Type: text/x-patch
Size: 1491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150825/1e473515/attachment.bin>
More information about the cfe-commits
mailing list