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.
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. Ifclang++is missing at runtime, ast_canopy can fall back to a non-existent resource directory and fail before parsing user headers.TODO
-resource-dir=....clang++ -print-resource-diras an override/fallback path when explicitly requested or available.__clang_cuda_runtime_wrapper.hand dependent resource headers are present in built wheels.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.