Repository navigation
Main - #1
Merged
Merged
Main#1
Conversation
The extension build failed inside Apple's own headers -- OSObject.iig, IOService.iig, OSAction.iig -- with "variable has incomplete type 'class KERNEL'" and a dozen like it. The SDK is fine. The iig invocation passed -isysroot but no -target, so clang parsed those headers as macOS ones, the iig annotation macros behind the platform checks never got defined, and KERNEL, NATIVE and EXTENDS were left looking like undeclared types. The target now lives in DEXT_INCLUDES, which both the compiler and iig use, so the two can no longer disagree about what platform they are building for. The explicit -iframework and -isystem paths are gone with it: with the right target, clang finds the DriverKit layout itself. Also stop hard-coding the name of the DriverKit C runtime. It has been spelled both ways across SDKs, so link whichever this one ships rather than a guess that breaks on the next Xcode. In the app, the status helper was called setStatus:, which is the setter the status property already synthesises; every call was passing an NSString where the compiler expected an NSTextField. Renamed to showStatus:. Six warnings, one of which was a real bug waiting for the first error message.
iig rejected -target outright: "-target is only permitted with an unknown arch". It parses that option itself rather than handing it to clang, and takes the platform from --deployment-target instead. So the target goes back to the compiler alone, where it belongs, and iig gets --deployment-target 22.0. That leaves the original failure, which -target was the wrong fix for. The DriverKit headers gate their annotation macros -- KERNEL, NATIVE, EXTENDS, LOCALONLY -- on __IIG, so without -D__IIG=1 they expand to nothing clang can parse and iig fails inside Apple's own OSObject.iig with "variable has incomplete type 'class KERNEL'". That reads like a broken SDK and is not one. Both facts are now written down next to the rule, because neither is documented and the errors point elsewhere. The toolchain step prints `iig --help`, so the next wrong guess costs a log read rather than a build.
iig and the driver's main file are through; these were the last of it. kIOUSBPipeStalled does not exist. Rather than hunt for whatever the constant is called in this SDK, drop the test: Apple's own clearStall() documentation says a bulk endpoint halts after any I/O error except a timeout and stays halted until cleared, so clearing on every non-abort failure is both simpler and closer to the documented behaviour. On an endpoint that is not halted it is a no-op. Without this the first error on a pipe would have made every later transfer on it fail the same way. CLOCK_UPTIME_RAW needed <time.h>, which nothing else dragged in. USBDriverKitDefs.h was included on its own, which does not compile: it declares IOUSBHostFreeDescriptor over descriptor types it does not define itself. Nothing in this file needed it once the stall constant was gone, so it is simply out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.