Skip to content

Commit e5129b7

Browse files
authored
[Flang] Implicitly add clang if flang enabled (#123964)
Clang is required to compile Flang. Instead of erroring-out if Clang is enabled, for convinience implicitly add it to `LLVM_ENABLE_PROJECTS`, consistent with how the MLIR dependency is handled. This is motivatated by the discussion on whether flang-rt shoud be enabled implicitly (https://discourse.llvm.org/t/buildbot-changes-with-llvm-enable-runtimes-flang-rt/83571/2). Since the answer was yet, clang would have been the only exception of not being enabled implicitly. Fixed with this commit.
1 parent cb7b10c commit e5129b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ if ("flang" IN_LIST LLVM_ENABLE_PROJECTS)
146146
endif()
147147

148148
if (NOT "clang" IN_LIST LLVM_ENABLE_PROJECTS)
149-
message(FATAL_ERROR "Clang is not enabled, but is required for the Flang driver")
149+
message(STATUS "Enabling clang as a dependency to flang")
150+
list(APPEND LLVM_ENABLE_PROJECTS "clang")
150151
endif()
151152
endif()
152153

0 commit comments

Comments
 (0)