From 75033770f4be4695964ca7619334c747d0c96836 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! llvm-svn: 124718 --- clang/lib/Driver/Tools.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 8f8c64d46051..a2536381c333 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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.