We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbf3dd2 commit 47f0404Copy full SHA for 47f0404
lld/COFF/Driver.cpp
@@ -1707,9 +1707,17 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
1707
config->driverWdm = args.hasArg(OPT_driver_wdm) ||
1708
args.hasArg(OPT_driver_uponly_wdm) ||
1709
args.hasArg(OPT_driver_wdm_uponly);
1710
- config->driver =
+ config->driver |=
1711
config->driverUponly || config->driverWdm || args.hasArg(OPT_driver);
1712
-
+
1713
+ // Check if any ObjFile instance has kernel enabled
1714
+ for (ObjFile *file : ctx.objFileInstances) {
1715
+ if (file->doesKernelDriver()) {
1716
+ config->driver = true;
1717
+ break;
1718
+ }
1719
1720
1721
// Handle /pdb
1722
bool shouldCreatePDB =
1723
(debug == DebugKind::Full || debug == DebugKind::GHash ||
0 commit comments