@@ -9482,26 +9482,21 @@ void tools::SHAVE::Compiler::ConstructJob(Compilation &C, const JobAction &JA,
9482
9482
assert(II.getType() == types::TY_C || II.getType() == types::TY_CXX);
9483
9483
assert(Output.getType() == types::TY_PP_Asm); // Require preprocessed asm.
9484
9484
9485
- // Append all -I, -iquote, -isystem paths, and defines/undefines.
9486
- // These are spelled the same way in clang and moviCompile.
9487
- Args.AddAllArgs(CmdArgs,
9488
- {options::OPT_clang_i_Group, options::OPT_D, options::OPT_U});
9489
-
9490
9485
CmdArgs.push_back("-DMYRIAD2");
9491
9486
CmdArgs.push_back("-mcpu=myriad2");
9492
9487
CmdArgs.push_back("-S");
9493
9488
9494
- // Any -O option passes through without translation. What about -Ofast ?
9495
- if (Arg *A = Args.getLastArg( options::OPT_O_Group))
9496
- A->render(Args, CmdArgs);
9497
-
9498
- if (Args.hasFlag( options::OPT_ffunction_sections ,
9499
- options::OPT_fno_function_sections)) {
9500
- CmdArgs.push_back("-ffunction-sections");
9501
- }
9502
- if (Args.hasArg( options::OPT_fno_inline_functions))
9503
- CmdArgs.push_back("-fno-inline-functions");
9504
-
9489
+ // Append all -I, -iquote, -isystem paths, defines/undefines,
9490
+ // 'f' flags, optimize flags, and warning options.
9491
+ // These are spelled the same way in clang and moviCompile.
9492
+ Args.AddAllArgs(CmdArgs,
9493
+ { options::OPT_I_Group, options::OPT_clang_i_Group ,
9494
+ options::OPT_D, options::OPT_U,
9495
+ options::OPT_f_Group,
9496
+ options::OPT_f_clang_Group,
9497
+ options::OPT_g_Group,
9498
+ options::OPT_O_Group,
9499
+ options::OPT_W_Group});
9505
9500
CmdArgs.push_back("-fno-exceptions"); // Always do this even if unspecified.
9506
9501
9507
9502
CmdArgs.push_back(II.getFilename());
0 commit comments