Skip to content

Fix kernel toolchain action inputs - #80

Merged
fionera merged 1 commit into
hermeticbuild:mainfrom
fionera:agent/fix-kernel-action-inputs
Aug 5, 2026
Merged

Fix kernel toolchain action inputs#80
fionera merged 1 commit into
hermeticbuild:mainfrom
fionera:agent/fix-kernel-action-inputs

Conversation

@fionera

@fionera fionera commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • pass arch/x86/include/asm/inat.h to the x86 instruction-table generator and declare it as an action input
  • recover the unique Clang resource include tree from cc_toolchain.all_files when feature-generated flags omit it
  • apply the resource-header fallback to both regular and grouped Linux compile actions
  • add focused unit coverage for fallback, preservation, and path recognition

Root cause

The x86 generator binary requires -inat_h, but the bzImage action only supplied the opcode map. Separately, Linux compile actions add -nostdinc and previously relied on the configured feature flags to carry Clang's resource include directory; some source-built hermetic LLVM toolchains declare that tree in all_files without emitting the corresponding flag.

Fixes #78.
Fixes #79.

Validation

  • focused compile-flag, grouped-action, helper, and buildifier tests: 5/5 passed
  • //:kernel_outputs_x86_64_build_test: passed after building the complete x86 image graph (4,474 actions)
  • //:kvm_arm64_neon_kernel_build_test: passed after building the ARM64 KVM/NEON kernel graph (3,028 graph actions)
  • path-mapped aquery confirms LinuxX86InsnAttr declares both inat.h and the opcode map and passes -inat_h

The broad local //... run reached 151 passing tests with no test failures, but Bazel 9.1 twice crashed internally in Skyframe under the CI state-discard options. A subsequent run without those options exhausted the shared workspace disk while sandboxing unrelated Go links. The draft PR CI is left to run the complete clean matrix.

@fionera
fionera marked this pull request as ready for review August 5, 2026 17:04
@fionera
fionera merged commit 29f239e into hermeticbuild:main Aug 5, 2026
21 checks passed
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.

Linux compile actions can lose declared Clang resource headers x86 bzImage instruction-table action omits required inat.h input

1 participant