From b2d11cc3abd5ddf421a9bd36c6ec558038748a83 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Wed, 2 Feb 2011 06:43:03 +0000 Subject: [PATCH] Turn on -momit-leaf-frame-pointer by default on all non-Darwin platforms. Fixes PR9121! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124718 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 8f8c64d460..a2536381c3 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1089,9 +1089,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(A->getValue(Args)); } - // -mno-omit-leaf-frame-pointer is default. + // -mno-omit-leaf-frame-pointer is the default on Darwin. if (Args.hasFlag(options::OPT_momit_leaf_frame_pointer, - options::OPT_mno_omit_leaf_frame_pointer, false)) + options::OPT_mno_omit_leaf_frame_pointer, + getToolChain().getTriple().getOS() != llvm::Triple::Darwin)) CmdArgs.push_back("-momit-leaf-frame-pointer"); // -fno-math-errno is default. -- 2.40.0