[all-commits] [llvm/llvm-project] 23de87: [CMake] Add dependent project mode for Flang's MLI...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Wed Sep 9 10:44:09 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 23de87dae7695634bb618e188912de11267f1dd0
https://github.com/llvm/llvm-project/commit/23de87dae7695634bb618e188912de11267f1dd0
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-09-09 (Wed, 09 Sep 2026)
Changed paths:
M clang/CMakeLists.txt
M clang/cmake/modules/CMakeLists.txt
M flang/CMakeLists.txt
M llvm/CMakeLists.txt
M llvm/cmake/modules/AddLLVM.cmake
M llvm/cmake/modules/CrossCompile.cmake
M llvm/docs/CMake.md
M llvm/docs/ReleaseNotes.md
M mlir/CMakeLists.txt
M mlir/cmake/modules/CMakeLists.txt
M mlir/test/CMakeLists.txt
M mlir/test/lib/Dialect/TestDyn/CMakeLists.txt
M mlir/test/lib/Dialect/Tosa/CMakeLists.txt
M mlir/test/lib/Dialect/XeGPU/CMakeLists.txt
Log Message:
-----------
[CMake] Add dependent project mode for Flang's MLIR (#221724)
`LLVM_ENABLE_PROJECTS` historically treats projects enabled to satisfy
another
project's dependency the same as projects selected by the user.
Consequently,
implicit projects attach their complete build, install, and test suites
to
LLVM's aggregate targets.
Keep the cache entry as the user-requested project roots and use the
normal
`LLVM_ENABLE_PROJECTS` variable as the effective dependency closure.
Projects
in the effective list but not the cache entry are configured with
`EXCLUDE_FROM_ALL`. Normalize the special `all` value before comparing
the two
sets.
This makes Flang's MLIR and Clang dependencies dependency-only without a
second
project collection. It also applies the same rule to Clang when it is
added for
LLDB. Forward the cached roots to cross-compilation and bootstrap
configurations so implicit projects do not become explicit in nested
builds.
Let MLIR own its dependency-only test policy: configure its complete
test tree
so `check-mlir` remains available, but exclude MLIR test execution and
build
dependencies from `check-all`. Explicitly enabling MLIR preserves the
existing
behavior.
Validation:
- Configured Flang with implicit MLIR test support.
- Configured Flang and MLIR explicitly with tests enabled.
- Configured `LLVM_ENABLE_PROJECTS=all` with tests disabled.
- Verified implicit mode exposes `check-flang` and `check-mlir` while
`check-all` runs Flang but not MLIR.
- Verified explicit mode includes MLIR tests in `check-all`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list