From: Renato Golin Date: Fri, 31 Jan 2014 14:13:20 +0000 (+0000) Subject: Connect -fno-exceptions to -arm-disable-ehabi X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49d840629a1a7544144835e5fdaeb0f184e6ae5b;p=clang Connect -fno-exceptions to -arm-disable-ehabi git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200545 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 0be232f15c..9577aaacd5 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -830,6 +830,12 @@ void Clang::AddARMTargetArgs(const ArgList &Args, CmdArgs.push_back("-backend-option"); CmdArgs.push_back("-arm-reserve-r9"); } + + // Exception handling + if (Args.hasArg(options::OPT_fno_exceptions)) { + CmdArgs.push_back("-backend-option"); + CmdArgs.push_back("-arm-disable-ehabi"); + } } // Get CPU and ABI names. They are not independent diff --git a/test/Driver/arm-no-exception.c b/test/Driver/arm-no-exception.c new file mode 100644 index 0000000000..6c6036e06c --- /dev/null +++ b/test/Driver/arm-no-exception.c @@ -0,0 +1,4 @@ +// RUN: %clang -target arm-none-gnueeabi -fno-exceptions -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-NOEH < %t %s + +// CHECK-NOEH: "-backend-option" "-arm-disable-ehabi"