Build DriverKit in projects with a test plan

I'm trying to build an XCode project that contains an app and another target for the DriverKit, and run into the following linker issue:

ld: file cannot be open()ed, errno=2 path=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.profile_driverkit.a in '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.profile_driverkit.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My project has Code Coverage enabled. I noticed that if I disabled Code Coverage for all targets, I would be able to build successfully, and the driverKit would work as expected.

I wonder if it would be possible to build DriverKit without disabling code coverage.

Thanks

My project has Code Coverage enabled. I noticed that if I disabled Code Coverage for all targets, I would be able to build successfully, and the driverKit would work as expected.

Please file a bug on this and post the bug number back here.

I wonder if it would be possible to build DriverKit without disabling code coverage.

To be honest, I'm not sure. The file itself is present (at least in my Xcode installation), so I'm not sure what would have caused that specific failure.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

I've submitted bug FB14290870

Thanks.

Build DriverKit in projects with a test plan
 
 
Q