fix(windows-drivers): define IDD_STUB for the iddcx bindgen pass
apple / swift (push) Failing after 3s
apple / screenshots (push) Has been skipped
windows-drivers / probe-and-proto (push) Successful in 19s
windows-drivers / driver-build (push) Failing after 42s
windows-host / package (push) Successful in 5m21s
ci / rust (push) Successful in 1m17s
ci / web (push) Successful in 43s
android / android (push) Successful in 3m16s
ci / docs-site (push) Successful in 53s
deb / build-publish (push) Successful in 3m20s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 6s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
ci / bench (push) Successful in 4m47s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m19s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m33s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m41s
docker / deploy-docs (push) Successful in 19s

The iddcx bindgen failed with IddCxFuncEnum.h "IDDCX_VERSION_MAJOR is not defined"
+ a cascade of "must use struct tag" on IDARG_* types — NOT the feared #515
header conflict (IddCx parsed fine alongside Base+Wdf). IddCx.h needs STUB mode
(function-table dispatch) for the version macros to resolve; add -DIDD_STUB to
generate_iddcx, matching the wdf-umdf oracle. Deliberately NOT WDF_STUB (wdk-sys
parses wdf non-stubbed; desyncing only here would break WDF type-identity).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 14:18:03 +00:00
parent 9fd19b90a9
commit 60df3c9c52
+7
View File
@@ -356,6 +356,13 @@ fn generate_iddcx(out_path: &Path, config: &Config) -> Result<(), ConfigError> {
let bindgen_builder = {
bindgen::Builder::wdk_default(config)?
// IddCx headers MUST be in STUB mode (function-table dispatch): IddCxFuncEnum.h otherwise
// errors "IDDCX_VERSION_MAJOR is not defined", cascading into "must use 'struct' tag" on the
// IDARG_* types (their version-gated typedefs get skipped). `#define IDD_STUB` is exactly
// what the proven wdf-umdf oracle uses. Do NOT add WDF_STUB — wdk-sys parses wdf.h
// non-stubbed, and stubbing it only here would desync the WDF types the iddcx module resolves
// against, breaking type-identity.
.clang_arg("-DIDD_STUB")
.with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement())
.header_contents("iddcx-input.h", &header_contents)
// Allowlist by the "iddcx" path component (separator-agnostic) so ONLY IddCx items are