I'm trying to build the DriverKit template driver target in an Xcode project which contains an app targeting iPadOS 17. I've made no modifications to the DriverKit template. When building, I get this link error
ld: file cannot be open()ed, errno=2 path=/Applications/Xcode 15.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.profile_driverkit.a in '/Applications/Xcode 15.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.profile_driverkit.a'
anyone know how to fix this? My search turned up something about building llvm from sources, which seems like overkill to put a DriverKit driver into an iPad app.
DTS (thank you Quinn!) helped me solve this.
The problem is a bug in Xcode's support for DriverKit in projects with a test plan (FB13381958). You have to go into the configuration of the test plan and disable Code Coverage for all targets. Disabling Code Coverage for the driver target only does not work .
Note that there's a code coverage setting in the target's Build Settings too, but changing that setting won't make the link error go away.