[llvm] [cmake] Place clang behind mlir in the liist of external projects (PR #86050)

Nathan Lanza via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 17:55:06 PDT 2024


https://github.com/lanza created https://github.com/llvm/llvm-project/pull/86050

In preparation for the initial ClangIR upstreaming process, move clang behind MLIR in the list of external projects. Otherwise, cmake will attempt to build clang before MLIR.

This is *technically* the first PR for ClangIR :p

>From bd6c4d0be760995e3a3c66e062de0405ff1efd64 Mon Sep 17 00:00:00 2001
From: Nathan Lanza <nathanlanza at gmail.com>
Date: Wed, 20 Mar 2024 17:50:34 -0700
Subject: [PATCH] [cmake] Place clang behind mlir in the liist of external
 projects

In preparation for the initial ClangIR upstreaming process, move clang
behind MLIR in the list of external projects. Otherwise, cmake will
attempt to build clang before MLIR.
---
 llvm/tools/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/tools/CMakeLists.txt b/llvm/tools/CMakeLists.txt
index c6116ac81d12b2..2969877b9ee7c3 100644
--- a/llvm/tools/CMakeLists.txt
+++ b/llvm/tools/CMakeLists.txt
@@ -37,11 +37,11 @@ add_llvm_tool_subdirectory(llvm-profdata)
 
 # Projects supported via LLVM_EXTERNAL_*_SOURCE_DIR need to be explicitly
 # specified.
-add_llvm_external_project(clang)
 add_llvm_external_project(lld)
 add_llvm_external_project(lldb)
 add_llvm_external_project(mlir)
-# Flang depends on mlir, so place it afterward
+# ClangIR and Flang depends on mlir, so place them afterwards
+add_llvm_external_project(clang)
 add_llvm_external_project(flang)
 add_llvm_external_project(bolt)
 



More information about the llvm-commits mailing list