[all-commits] [llvm/llvm-project] dfd987: [Clang] Make Clang copy its CMake modules into the...
Andrzej WarzyĆski via All-commits
all-commits at lists.llvm.org
Wed Jan 12 01:54:14 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dfd9879d6f43949443ba3c58cf3969ed582d7466
https://github.com/llvm/llvm-project/commit/dfd9879d6f43949443ba3c58cf3969ed582d7466
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2022-01-12 (Wed, 12 Jan 2022)
Changed paths:
M clang/cmake/modules/CMakeLists.txt
Log Message:
-----------
[Clang] Make Clang copy its CMake modules into the build dir
LLVM has a documented mechanism for passing configuration information to
an out of tree project using CMake. See
https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project.
Similar logic applies to "standalone" builds of other sub-projects
within LLVM that depend on each other. For example, a standalone build
of Flang will use this mechanism to acquire Clang's configuration.
Currently, the relevant CMake modules for Clang will only be copied into
the installation directory. This means that in order to configure a
standalone build of Flang, one has to first build and then install
Clang. This is not required for LLVM nor for MLIR - other sub-projects
that Flang depends on (i.e. the CMake modules for LLVM and MLIR are
available in the build dir, so installation is not needed).
This change removes the need for installing Clang in order to access its
configuration. It makes sure that the required CMake modules are copied
into the build directory. This will make Clang behave consistently with
LLVM and MLIR in this respect. It will also simplify building Flang as
standalone sub-project.
Differential Revision: https://reviews.llvm.org/D116731
More information about the All-commits
mailing list