diff options
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp')
-rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp index 199b3dadfd7..d5495d63511 100644 --- a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp @@ -528,6 +528,18 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args, return !areOptimizationsEnabled(Args); } + if (Triple.getOS() == llvm::Triple::OpenBSD) { + switch (Triple.getArch()) { + case llvm::Triple::mips64: + case llvm::Triple::mips64el: + case llvm::Triple::x86: + case llvm::Triple::x86_64: + return !areOptimizationsEnabled(Args); + default: + return true; + } + } + if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI) { switch (Triple.getArch()) { // Don't use a frame pointer on linux if optimizing for certain targets. |