Simpler check (thanks Joey) and test.
Hi samsonov, rnk, keith.walker.arm,
http://llvm-reviews.chandlerc.com/D2666
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D2666?vs=6792&id=6794#toc
Files:
lib/Driver/Tools.cpp
test/Driver/arm-no-exception.c
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -830,6 +830,10 @@
CmdArgs.push_back("-backend-option");
CmdArgs.push_back("-arm-reserve-r9");
}
+
+ // Exception handling
+ if (Args.hasArg(options::OPT_fno_exceptions))
+ CmdArgs.push_back("-arm-disable-ehabi");
}
// Get CPU and ABI names. They are not independent
Index: test/Driver/arm-no-exception.c
===================================================================
--- /dev/null
+++ 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: "-arm-disable-ehabi"
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -830,6 +830,10 @@
CmdArgs.push_back("-backend-option");
CmdArgs.push_back("-arm-reserve-r9");
}
+
+ // Exception handling
+ if (Args.hasArg(options::OPT_fno_exceptions))
+ CmdArgs.push_back("-arm-disable-ehabi");
}
// Get CPU and ABI names. They are not independent
Index: test/Driver/arm-no-exception.c
===================================================================
--- /dev/null
+++ 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: "-arm-disable-ehabi"
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits