diff --git a/clang/include/clang/Driver/Options.def b/clang/include/clang/Driver/Options.def index 5826d012d83d..406e62dae7e5 100644 --- a/clang/include/clang/Driver/Options.def +++ b/clang/include/clang/Driver/Options.def @@ -420,6 +420,7 @@ OPTION("-fno-inline-functions", fno_inline_functions, Flag, clang_ignored_f_Grou OPTION("-fno-inline", fno_inline, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-keep-inline-functions", fno_keep_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-math-errno", fno_math_errno, Flag, f_Group, INVALID, "", 0, 0, 0) +OPTION("-fno-omit-frame-pointer", fno_omit_frame_pointer, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-pascal-strings", fno_pascal_strings, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-rtti", fno_rtti, Flag, f_Group, INVALID, "", 0, 0, 0) OPTION("-fno-show-column", fno_show_column, Flag, f_Group, INVALID, "", 0, 0, 0) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index be036be13589..69fc722e24b0 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -309,7 +309,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_ftime_report)) CmdArgs.push_back("--time-passes"); // FIXME: Set --enable-unsafe-fp-math. - if (!Args.hasArg(options::OPT_fomit_frame_pointer)) + if (Args.hasArg(options::OPT_fno_omit_frame_pointer) || + !Args.hasArg(options::OPT_fomit_frame_pointer)) CmdArgs.push_back("--disable-fp-elim"); if (!Args.hasFlag(options::OPT_fzero_initialized_in_bss, options::OPT_fno_zero_initialized_in_bss,