[all-commits] [llvm/llvm-project] b92b5b: [CMake] Add dependency-only project mode for Flang...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Mon Sep 7 06:54:43 PDT 2026
Branch: refs/heads/users/mamini/clang-cir-dependent-mlir
Home: https://github.com/llvm/llvm-project
Commit: b92b5b92c569748e2e17815b4565d0b16310e07f
https://github.com/llvm/llvm-project/commit/b92b5b92c569748e2e17815b4565d0b16310e07f
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)
Changed paths:
M llvm/CMakeLists.txt
M llvm/cmake/modules/AddLLVM.cmake
M mlir/CMakeLists.txt
Log Message:
-----------
[CMake] Add dependency-only project mode for Flang's MLIR
LLVM_ENABLE_PROJECTS historically treats projects enabled to satisfy another
project's dependency the same as projects selected by the user. Consequently,
enabling Flang attaches the complete MLIR project, install rules, and test
suites to LLVM's aggregate targets.
Record implicit dependencies in the internal-only
LLVM_DEPENDENCY_ONLY_PROJECTS list without changing LLVM_ENABLE_PROJECTS.
Normalize the list after collecting dependencies so duplicate requests are
removed and explicit project selections always take precedence.
Teach project setup to configure the union of both lists and add
dependency-only source directories with EXCLUDE_FROM_ALL. This keeps every
MLIR target available for normal dependency resolution while omitting MLIR-wide
build and install targets. Flang is the first user of this mode.
Let MLIR own its dependency-only test policy: configure test support libraries
for downstream consumers without creating MLIR unit tests or registering its
lit suite. Explicitly enabling MLIR preserves the existing behavior.
Assisted-by: Codex
Commit: 288d5579d9e669f5f047cb2813ecf6a8328f6e5c
https://github.com/llvm/llvm-project/commit/288d5579d9e669f5f047cb2813ecf6a8328f6e5c
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)
Changed paths:
M clang/CMakeLists.txt
M llvm/CMakeLists.txt
Log Message:
-----------
[CIR][CMake] Configure MLIR as a dependency-only project
ClangIR requires MLIR, but enabling CIR currently requires users to list MLIR
explicitly in LLVM_ENABLE_PROJECTS. That also attaches all MLIR build, install,
unit-test, and lit targets to the corresponding LLVM aggregates.
When Clang is selected and CLANG_ENABLE_CIR is enabled, record MLIR in
LLVM_DEPENDENCY_ONLY_PROJECTS. The common project setup normalizes this request
against LLVM_ENABLE_PROJECTS, so an explicit MLIR selection still takes
precedence while an implicit selection remains dependency-only.
This configures the MLIR targets used by CIR without changing
LLVM_ENABLE_PROJECTS or enabling MLIR's aggregate targets. Keep the existing
standalone ClangIR restriction, and continue to omit MLIR when CIR is disabled.
Assisted-by: Codex
Compare: https://github.com/llvm/llvm-project/compare/538acace3b8e...288d5579d9e6
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