diff options
| author | Renato Golin <renato.golin@linaro.org> | 2014-01-31 14:13:20 +0000 |
|---|---|---|
| committer | Renato Golin <renato.golin@linaro.org> | 2014-01-31 14:13:20 +0000 |
| commit | e7a971b7fa36c6bd46d1b529cc2f4e4b3128253f (patch) | |
| tree | 013fd318ff533d076880d2b80c5e8b0928d55330 | |
| parent | 6b3397546e15859ac0e53f29a6ca46e3739ed558 (diff) | |
| download | llvm-e7a971b7fa36c6bd46d1b529cc2f4e4b3128253f.zip llvm-e7a971b7fa36c6bd46d1b529cc2f4e4b3128253f.tar.gz llvm-e7a971b7fa36c6bd46d1b529cc2f4e4b3128253f.tar.bz2 | |
Connect -fno-exceptions to -arm-disable-ehabi
llvm-svn: 200545
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 6 | ||||
| -rw-r--r-- | clang/test/Driver/arm-no-exception.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 0be232f..9577aaa 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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/clang/test/Driver/arm-no-exception.c b/clang/test/Driver/arm-no-exception.c new file mode 100644 index 0000000..6c6036e --- /dev/null +++ b/clang/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" |
