Xcode 12 official release - errors compiling driverkit OSAction

After updating to the new Xcode 12 ( not beta) building our driver kit extension fails for the derived source file Comm.iig.cpp with messages complaining about too many arguments to IODataQueueDispatchSource.

This is from Big Sur running on Intel, I am seeing the same behaviour on Catalina.

This worked correctly with the previous version of Xcode and the previous Xcode-beta.


Users/sl/work20/musbland/comm-dext/build/driverkit.build/Debug-driverkit/DriverKit.build/DerivedSources/com.belcarra.belcarra-comm-driverkit/Comm.iig.cpp:296:186: error: too many arguments to function call, expected 3, have 4
ret = IODataQueueDispatchSource::DataAvailableInvoke(rpc, self, SimpleMemberFunctionCast(IODataQueueDispatchSource::DataAvailableHandler, *self, &Comm::TxAvailableImpl), OSTypeID(OSActionComm_TxAvailable));

In file included from /Users/sl/work20/musbland/comm-dext/build/driverkit.build/Debug-driverkit/DriverKit.build/DerivedSources/com.belcarra.belcarra-comm-driverkit/Comm.iig.cpp:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk/System/DriverKit/System/Library/Frameworks/DriverKit.framework/Headers/DriverKit.h:44:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk/System/DriverKit/System/Library/Frameworks/DriverKit.framework/Headers/OSCollections.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk/System/DriverKit/System/Library/Frameworks/DriverKit.framework/Headers/OSCollection.h:35:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk/System/DriverKit/System/Library/Frameworks/DriverKit.framework/Headers/OSObject.h:46:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/DriverKit19.0.sdk/System/DriverKit/System/Library/Frameworks/DriverKit.framework/Headers/OSMetaClass.h:185:28: note: expanded from macro 'OSTypeID'
#define OSTypeID(type) g

type ## MetaClass

^~~~~~

Replies

A diff between the .iig.cpp files generated by Xcode 11 and Xcode 12 show that there is a substantial change at the lines where the error is indicated from the build log:

Code Block
case Comm_TxAvailable_ID:
{
- union {
- void (Comm::*fIn)(IODataQueueDispatchSource_DataAvailable_Args);
- IODataQueueDispatchSource::DataAvailable_Handler handler;
- } map;
- map.fIn = &Comm::TxAvailable_Impl;
- ret = IODataQueueDispatchSource::DataAvailable_Invoke(rpc, self, map.handler);
+ ret = IODataQueueDispatchSource::DataAvailable_Invoke(rpc, self, SimpleMemberFunctionCast(IODataQueueDispatchSource::DataAvailable_Handler, *self, &Comm::TxAvailable_Impl), OSTypeID(OSAction_Comm_TxAvailable));
break;
}


The creation of the iig.cpp files is automatic. The base class iig file is unchanged. From my perspective the only change is Xcode 11 was automatically updated to Xcode 12 and I can no longer build or test.

I have verified the same behaviour on both my Catalina based development system and my Big Sur (on Intel) development system.







I have the same issue.