Skip to content

Conversation

@alexreinking
Copy link
Member

LLVM sadly doesn't provide *ConfigVersion.cmake files for its sub-components, including Clang and LLD. Consequently, attempting to constrain the version to LLVM_PACKAGE_VERSION prevents these find_package calls from succeeding at all. Worse, package maintainers have some "interesting" ideas as to how they should lay out the -dev packages, especially when they want to support multiple parallel versions. These hints take effect at a lower precedence than Halide_LLVM_ROOT or CMAKE_PREFIX_PATH (which are the standard ways of setting up the dependency search), but at a higher precedence than the system-wide fallback locations.

In particular, Homebrew split the LLVM and LLD packages as of version 19, so having multiple LLVM versions installed leads to the newest LLD being found without the hint in this commit.

LLVM sadly doesn't provide *ConfigVersion.cmake files for its
sub-components, including Clang and LLD. Consequently, attempting to
constrain the version to LLVM_PACKAGE_VERSION prevents these
find_package calls from succeeding at all. Worse, package maintainers
have some "interesting" ideas as to how they should lay out the -dev
packages, especially when they want to support multiple parallel
versions. These hints take effect at a lower precedence than
Halide_LLVM_ROOT or CMAKE_PREFIX_PATH (which are the standard ways of
setting up the dependency search), but at a higher precedence than the
system-wide fallback locations.

In particular, Homebrew split the LLVM and LLD packages as of version
19, so having multiple LLVM versions installed leads to the newest LLD
being found without the hint in this commit.
@alexreinking alexreinking added the build Issues related to building Halide and with CI label Apr 23, 2025
@alexreinking
Copy link
Member Author

Failures are due to buildbot issues: missing Node environment and some corrupt PCH.

@alexreinking alexreinking merged commit 052e18e into main Apr 24, 2025
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues related to building Halide and with CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants