Skip to content

Remove FetchContent from compiler#9001

Merged
alexreinking merged 14 commits intomainfrom
alexreinking/drop-fetchcontent
Mar 11, 2026
Merged

Remove FetchContent from compiler#9001
alexreinking merged 14 commits intomainfrom
alexreinking/drop-fetchcontent

Conversation

@alexreinking
Copy link
Member

@alexreinking alexreinking commented Mar 10, 2026

FetchContent is an absolute nightmare of a dependency management feature. The fact that it brings third-party CMake code into your build without any kind of isolation has been a long source of headaches. Over the years, I've had to nearly rewrite wabt's build system, contribute patches to CMake, hack around missing features, write extra detection modules, and complicate our packaging rules just to skip a simple installation step (e.g. brew install wabt flatbuffers).

For the purposes of CI, we replace our usage of FetchContent with vcpkg; however, we are careful not to write the build in such a way that it is aware of vcpkg. The clang-tidy workflows continue to use Homebrew dependencies; this way we can notice if we get out of sync with the ecosystem.


Supersedes an outdated attempt in #8952

@alexreinking
Copy link
Member Author

#9001

image

@alexreinking
Copy link
Member Author

This is also going to require some CI restructuring. Not too much, but some.

@alexreinking alexreinking force-pushed the alexreinking/drop-fetchcontent branch from 7b1c210 to 7959709 Compare March 10, 2026 19:09
@alexreinking alexreinking added the skip_buildbots Do not run buildbots on this PR. Must add before opening PR as we scan labels immediately. label Mar 10, 2026
@alexreinking
Copy link
Member Author

Skipping buildbots until GHA stabilizes

@alexreinking
Copy link
Member Author

The toolchain/triplet "abstraction" is tricky enough that I opened an issue with vcpkg: microsoft/vcpkg#50394

@alexreinking alexreinking requested a review from abadams March 10, 2026 23:52
@alexreinking alexreinking marked this pull request as ready for review March 10, 2026 23:53
@alexreinking alexreinking removed the skip_buildbots Do not run buildbots on this PR. Must add before opening PR as we scan labels immediately. label Mar 11, 2026
alexreinking added a commit to halide/build_bot that referenced this pull request Mar 11, 2026
We have both Accelerate and Eigen, that's plenty.
Copy link
Contributor

@shoaibkamil shoaibkamil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@alexreinking
Copy link
Member Author

alexreinking commented Mar 11, 2026

Buildbot results

Builder Notes
arm-64-osx correctness_lossless_cast fuzz test failed -> #8928 reopened
x86-64-osx openblas crashing in linear_algebra app -> disabling openblas on Intel mac in favor of eigen/accelerate
⚠️ x86-64-windows looks like the onnx tests time out on win-worker-3 specifically
x86-64-linux (LLVM main) The Hexagon runtime doesn't support RelWithDebInfo. Normalized to Release
x86-64-linux (LLVM 22)
x86-64-linux (LLVM 21)

Also opened #9002

@alexreinking
Copy link
Member Author

I'm merging despite the onnx failure since (a) it's intermittent and (b) I'm about to remove the last of the FetchContent from there in the next PR, so the underlying code is going to change, anyway.

@alexreinking alexreinking merged commit 1a9ac3c into main Mar 11, 2026
29 of 31 checks passed
@alexreinking alexreinking deleted the alexreinking/drop-fetchcontent branch March 11, 2026 07:08
alexreinking added a commit to halide/build_bot that referenced this pull request Mar 12, 2026
* Enable vcpkg everywhere

* Use the presets present in the Halide repo

See halide/Halide#9001

* HL_DISABLE_WINDOWS_ABORT_DIALOG no longer exists in main

* Re-enable CUDA caches

The problem disabling them was meant to solve
happened with drivers that are now six years
old. If we need to re-disable the cache, we
can take the opportunity to investigate more.

* Consolidate env dict creation
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.

2 participants