<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 3, 2015 at 7:34 AM, Douglas Katzman <span dir="ltr"><<a href="mailto:dougk@google.com" target="_blank">dougk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dougk<br>
Date: Mon Aug 3 09:34:22 2015<br>
New Revision: 243878<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D243878-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=bNqOMbPXCNOxY1QP3pYjw0vwm9QezVghml5wSZYkhZ0&s=wOIaJC-3Zec09DFRYCrwL4LJGoE8kRVcTRJL-PrY0i8&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=243878&view=rev</a><br>
Log:<br>
[SHAVE] Pass all -f, -g, -O, -W options through directly to moviCompile.<br>
<br>
Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11581&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=bNqOMbPXCNOxY1QP3pYjw0vwm9QezVghml5wSZYkhZ0&s=c-qQ_Ruxg8_zEKIY31NUZZ0XJlkm_0pgFmuO6cxjITA&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11581</a><br>
<br>
Modified:<br>
cfe/trunk/lib/Driver/Tools.cpp<br>
cfe/trunk/test/Driver/shave-toolchain.c<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_Driver_Tools.cpp-3Frev-3D243878-26r1-3D243877-26r2-3D243878-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=bNqOMbPXCNOxY1QP3pYjw0vwm9QezVghml5wSZYkhZ0&s=J6xPXFA1BuY_QX6xLpsGptVLuoKH3JxcTsCpl4xZ7Ns&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=243878&r1=243877&r2=243878&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Aug 3 09:34:22 2015<br>
@@ -9482,26 +9482,21 @@ void tools::SHAVE::Compiler::ConstructJo<br>
assert(II.getType() == types::TY_C || II.getType() == types::TY_CXX);<br>
assert(Output.getType() == types::TY_PP_Asm); // Require preprocessed asm.<br>
<br>
- // Append all -I, -iquote, -isystem paths, and defines/undefines.<br>
- // These are spelled the same way in clang and moviCompile.<br>
- Args.AddAllArgs(CmdArgs,<br>
- {options::OPT_clang_i_Group, options::OPT_D, options::OPT_U});<br>
-<br>
CmdArgs.push_back("-DMYRIAD2");<br>
CmdArgs.push_back("-mcpu=myriad2");<br>
CmdArgs.push_back("-S");<br>
<br>
- // Any -O option passes through without translation. What about -Ofast ?<br>
- if (Arg *A = Args.getLastArg(options::OPT_O_Group))<br>
- A->render(Args, CmdArgs);<br>
-<br>
- if (Args.hasFlag(options::OPT_ffunction_sections,<br>
- options::OPT_fno_function_sections)) {<br>
- CmdArgs.push_back("-ffunction-sections");<br>
- }<br>
- if (Args.hasArg(options::OPT_fno_inline_functions))<br>
- CmdArgs.push_back("-fno-inline-functions");<br>
-<br>
+ // Append all -I, -iquote, -isystem paths, defines/undefines,<br>
+ // 'f' flags, optimize flags, and warning options.<br>
+ // These are spelled the same way in clang and moviCompile.<br>
+ Args.AddAllArgs(CmdArgs,<br>
+ {options::OPT_I_Group, options::OPT_clang_i_Group,<br>
+ options::OPT_D, options::OPT_U,<br>
+ options::OPT_f_Group,<br>
+ options::OPT_f_clang_Group,<br>
+ options::OPT_g_Group,<br>
+ options::OPT_O_Group,<br>
+ options::OPT_W_Group});<br>
CmdArgs.push_back("-fno-exceptions"); // Always do this even if unspecified.<br>
<br>
CmdArgs.push_back(II.getFilename());<br>
<br>
Modified: cfe/trunk/test/Driver/shave-toolchain.c<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_test_Driver_shave-2Dtoolchain.c-3Frev-3D243878-26r1-3D243877-26r2-3D243878-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=bNqOMbPXCNOxY1QP3pYjw0vwm9QezVghml5wSZYkhZ0&s=UonJw1rVbOAmj3geY4i2gFM3ugCeeANqblD4BhdqDVc&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/shave-toolchain.c?rev=243878&r1=243877&r2=243878&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/shave-toolchain.c (original)<br>
+++ cfe/trunk/test/Driver/shave-toolchain.c Mon Aug 3 09:34:22 2015<br>
@@ -10,7 +10,7 @@<br>
<br>
// RUN: %clang -target shave -c -### %s -Icommon 2>&1 \<br>
// RUN: | FileCheck %s -check-prefix=movicompile<br>
-// movicompile: moviCompile" "-DMYRIAD2"<br>
+// movicompile: moviCompile" "-DMYRIAD2" "-mcpu=myriad2" "-S" "-I" "common"<br>
// movicompile: moviAsm" "-no6thSlotCompression" "-cv:myriad2" "-noSPrefixing" "-a" "-i:common" "-elf"<br></blockquote><div><br></div><div>CHECK: prefixes are usually all upper case; is there a reason you're using lowercase here?</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
// RUN: %clang -target shave -c -### %s -DEFINE_ME -UNDEFINE_ME 2>&1 \<br>
@@ -20,3 +20,9 @@<br>
// RUN: %clang -target shave -c -### %s -Icommon -iquote quotepath -isystem syspath 2>&1 \<br>
// RUN: | FileCheck %s -check-prefix=includes<br>
// includes: "-iquote" "quotepath" "-isystem" "syspath"<br>
+<br>
+// RUN: %clang -target shave -c -### %s -g -fno-inline-functions \<br>
+// RUN: -fno-inline-functions-called-once -Os -Wall \<br>
+// RUN: -ffunction-sections 2>&1 | FileCheck %s -check-prefix=F_G_O_W_OPTIONS<br>
+// F_G_O_W_OPTIONS: "-g" "-fno-inline-functions" "-fno-inline-functions-called-once"<br>
+// F_G_O_W_OPTIONS: "-Os" "-Wall" "-ffunction-sections"<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>