[PATCH] D126719: [clang-cl] Add support for /kernel
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 31 14:56:28 PDT 2022
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
More information about the cfe-commits
mailing list