[PATCH] D128238: [LLD][COFF] Support /kernel flag

Pengxuan Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 18:54:04 PDT 2022


pzheng updated this revision to Diff 438527.
pzheng added a comment.

minor change


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128238

Files:
  lld/COFF/Driver.cpp
  lld/COFF/Options.td


Index: lld/COFF/Options.td
===================================================================
--- lld/COFF/Options.td
+++ lld/COFF/Options.td
@@ -140,6 +140,7 @@
     HelpText<"Set IMAGE_DLL_CHARACTERISTICS_WDM_DRIVER bit in PE header">;
 def driver_wdm_uponly : F<"driver:wdm,uponly">;
 def driver_uponly_wdm : F<"driver:uponly,wdm">;
+def kernel : F<"kernel">;
 def nodefaultlib_all : F<"nodefaultlib">,
     HelpText<"Remove all default libraries">;
 def noentry : F<"noentry">,
Index: lld/COFF/Driver.cpp
===================================================================
--- lld/COFF/Driver.cpp
+++ lld/COFF/Driver.cpp
@@ -1841,7 +1841,8 @@
   config->incremental =
       args.hasFlag(OPT_incremental, OPT_incremental_no,
                    !config->doGC && config->doICF == ICFLevel::None &&
-                       !args.hasArg(OPT_order) && !args.hasArg(OPT_profile));
+                       !args.hasArg(OPT_order) && !args.hasArg(OPT_profile) &&
+                       !args.hasArg(OPT_kernel));
   config->integrityCheck =
       args.hasFlag(OPT_integritycheck, OPT_integritycheck_no, false);
   config->cetCompat = args.hasFlag(OPT_cetcompat, OPT_cetcompat_no, false);
@@ -1877,6 +1878,11 @@
     config->lldmapFile.clear();
   }
 
+  if (config->incremental && args.hasArg(OPT_kernel)) {
+    warn("ignoring '/incremental' due to '/kernel' specification");
+    config->incremental = false;
+  }
+
   if (config->incremental && args.hasArg(OPT_profile)) {
     warn("ignoring '/incremental' due to '/profile' specification");
     config->incremental = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128238.438527.patch
Type: text/x-patch
Size: 1580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220621/71a0ef4c/attachment.bin>


More information about the llvm-commits mailing list