Skip to content

Vendor Clang resource headers for ast_canopy wheels #366

Description

@isVoid

Context

Numbast MLIR CI exposed that statically linking Clang into ast_canopy is not enough for a reliable PyPI install. CUDA parsing still needs Clang resource headers such as __clang_cuda_runtime_wrapper.h. If clang++ is missing at runtime, ast_canopy can fall back to a non-existent resource directory and fail before parsing user headers.

TODO

  • Vendor the required Clang resource include directory from the LLVM/Clang version ast_canopy is built against.
  • Make ast_canopy prefer the packaged resource directory when constructing -resource-dir=....
  • Keep clang++ -print-resource-dir as an override/fallback path when explicitly requested or available.
  • Include LLVM license and notice material in the sdist/wheel for the vendored headers.
  • Preserve SPDX/license comments in vendored LLVM headers and document the source LLVM revision.
  • Add packaging checks that verify __clang_cuda_runtime_wrapper.h and dependent resource headers are present in built wheels.
  • Keep CUDA Toolkit headers out of the wheel unless separately reviewed; CUDA headers should continue to come from CUDA packages or CUDA_HOME.

Notes

LLVM/Clang resource headers are licensed under Apache-2.0 WITH LLVM-exception, which supports redistribution with retained notices. NVIDIA CUDA Toolkit headers have separate licensing and are not covered by this TODO.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions