Repository navigation
Add an ENVIRONMENT option to add_halide_library - #9545
Open
alexreinking wants to merge 1 commit into
Open
alexreinking wants to merge 1 commit into
alexreinking wants to merge 1 commit into
Conversation
ENVIRONMENT VAR=value... sets environment variables for one library's generator invocations, e.g. HL_LLVM_ARGS to pass LLVM flags to a single library. Since HL_LLVM_ARGS can change codegen, the generator compile cache now includes it in the cache key. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
alexreinking
marked this pull request as ready for review
October 10, 2026 17:12
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9545 +/- ##
==========================================
+ Coverage 71.05% 71.13% +0.07%
==========================================
Files 262 262
Lines 81084 81088 +4
Branches 19770 19770
==========================================
+ Hits 57615 57679 +64
+ Misses 17502 17480 -22
+ Partials 5967 5929 -38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add_halide_librarygainsENVIRONMENT VAR=value..., which sets environment variables for that library's generator invocations only (viacmake -E env). Entries must look likeNAME=value.The motivating use is
HL_LLVM_ARGS: LLVM options are process-global, so this is the only way to give one library a flag such as-misched-regpressure=falsewithout applying it to every library in the build.Because
HL_LLVM_ARGScan change codegen, the generator compile cache now includes it in the cache key; previously a cached result could be reused across differentHL_LLVM_ARGS.correctness_generator_cachechecks that changingHL_LLVM_ARGSmisses the cache (it fails without the key change). The newaot_generator_environmentintegration test passes an unknown LLVM option throughENVIRONMENTand checks that LLVM rejects it.Authored by GitHub Copilot