Since -mkernel implies -fapple-kext, this just extends the current behavior
for -fapple-kext to apply for -mkernel as well. Radar
9933387.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137566
91177308-0d34-0410-b5e6-
96231b3b80d8
types::isCXX(Inputs[0]->getType()) &&
getTriple().getOS() == llvm::Triple::Darwin &&
getTriple().getArch() == llvm::Triple::x86 &&
- C.getArgs().getLastArg(options::OPT_fapple_kext))
+ (C.getArgs().getLastArg(options::OPT_fapple_kext) ||
+ C.getArgs().getLastArg(options::OPT_mkernel)))
Key = JA.getKind();
else
Key = Action::AnalyzeJobClass;
if (types::isCXX(InputType) &&
getToolChain().getTriple().getOS() == llvm::Triple::Darwin &&
getToolChain().getTriple().getArch() == llvm::Triple::x86) {
- if ((Unsupported = Args.getLastArg(options::OPT_fapple_kext)))
+ if ((Unsupported = Args.getLastArg(options::OPT_fapple_kext)) ||
+ (Unsupported = Args.getLastArg(options::OPT_mkernel)))
D.Diag(diag::err_drv_clang_unsupported_opt_cxx_darwin_i386)
<< Unsupported->getOption().getName();
}
// CHECK: cc1plus"
// CHECK: "-fapple-kext"
+
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
+// RUN: -mkernel -### -fsyntax-only %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-MKERNEL < %t %s
+
+// CHECK-MKERNEL: cc1plus"
+// CHECK-MKERNEL: "-mkernel"