Skip to content

Main - #1

Merged
ExorTek merged 3 commits into
initial-implementationfrom
main
Oct 29, 2026
Merged

ExorTek merged 3 commits into
initial-implementationfrom
main

Conversation

@ExorTek

@ExorTek ExorTek commented Oct 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

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.
Copilot AI balanced review requested due to automatic review settings October 29, 2026 11:01
@ExorTek
ExorTek merged commit 34a10d9 into initial-implementation Oct 29, 2026
2 of 4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@ExorTek
ExorTek deleted the main branch October 29, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants