[PATCH] D11581: [SHAVE] Pass all -f, -g, -O, -W options through directly to moviCompile.
Douglas Katzman
dougk at google.com
Tue Jul 28 15:16:57 PDT 2015
dougk created this revision.
dougk added a reviewer: jyknight.
dougk added a subscriber: cfe-commits.
http://reviews.llvm.org/D11581
Files:
lib/Driver/Tools.cpp
test/Driver/shave-toolchain.c
Index: test/Driver/shave-toolchain.c
===================================================================
--- test/Driver/shave-toolchain.c
+++ test/Driver/shave-toolchain.c
@@ -20,3 +20,9 @@
// RUN: %clang -target shave -c -### %s -Icommon -iquote quotepath -isystem syspath 2>&1 \
// RUN: | FileCheck %s -check-prefix=includes
// includes: "-iquote" "quotepath" "-isystem" "syspath"
+
+// RUN: %clang -target shave -c -### %s -fno-inline-functions \
+// RUN: -fno-inline-functions-called-once -g -Os -Wall \
+// RUN: -ffunction-sections 2>&1 | FileCheck %s -check-prefix=F_G_O_W_OPTIONS
+// F_G_O_W_OPTIONS: "-fno-inline-functions" "-fno-inline-functions-called-once"
+// F_G_O_W_OPTIONS: "-g" "-ffunction-sections" "-Os" "-Wall"
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -9479,17 +9479,13 @@
CmdArgs.push_back("-mcpu=myriad2");
CmdArgs.push_back("-S");
- // Any -O option passes through without translation. What about -Ofast ?
- if (Arg *A = Args.getLastArg(options::OPT_O_Group))
- A->render(Args, CmdArgs);
-
- if (Args.hasFlag(options::OPT_ffunction_sections,
- options::OPT_fno_function_sections)) {
- CmdArgs.push_back("-ffunction-sections");
- }
- if (Args.hasArg(options::OPT_fno_inline_functions))
- CmdArgs.push_back("-fno-inline-functions");
-
+ Args.AddAllArgs(CmdArgs,
+ options::OPT_f_Group,
+ options::OPT_f_clang_Group,
+ options::OPT_g_Group);
+ Args.AddAllArgs(CmdArgs,
+ options::OPT_O_Group,
+ options::OPT_W_Group);
CmdArgs.push_back("-fno-exceptions"); // Always do this even if unspecified.
CmdArgs.push_back(II.getFilename());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11581.30865.patch
Type: text/x-patch
Size: 1800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150728/178778eb/attachment.bin>
More information about the cfe-commits
mailing list