thakis added a comment.

https://docs.microsoft.com/en-us/cpp/build/reference/kernel-create-kernel-mode-binary?view=msvc-170
 says we should err when `/kernel` is used with various flags (e.g. most 
`/arch:`) flags. Want to add that too?

It also says `/kernel` is passed on to the linker.

What does cl do if both `/kernel` and (eg) `/EHsc` is passed (try both orders)? 
Same question for `/kernel /GR`.



================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7461
 
+  if (Args.hasFlag(options::OPT__SLASH_kernel, options::OPT__SLASH_kernel,
+                   false)) {
----------------
hasFlag() is for when there's a positive (`/kernel`) and a negative 
(`/kernel-`) form. Is that the case here? Else, use `hasArg` instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126719/new/

https://reviews.llvm.org/D126719

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to