aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Driver/Tools.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 24d05c1b27..2ad98ea632 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1184,7 +1184,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fno-access-control");
// -fexceptions=0 is default.
- if (needsExceptions(Args, InputType, getToolChain().getTriple()))
+ if (!KernelOrKext &&
+ needsExceptions(Args, InputType, getToolChain().getTriple()))
CmdArgs.push_back("-fexceptions");
if (getToolChain().UseSjLjExceptions())