Skip to content

builtin_clang=OFF broken because of missing transitive dependencies #17461

@hahnjo

Description

@hahnjo

Since the upgrade to LLVM 16, building ROOT with builtin_clang=OFF fails to link. It can be "fixed" with the following diff:

diff --git a/interpreter/cling/lib/Interpreter/CMakeLists.txt b/interpreter/cling/lib/Interpreter/CMakeLists.txt
index e397da97f6..d0819c4667 100644
--- a/interpreter/cling/lib/Interpreter/CMakeLists.txt
+++ b/interpreter/cling/lib/Interpreter/CMakeLists.txt
@@ -14,13 +14,16 @@ set(LIBS
   clangParse
   clangSema
   clangAnalysis
+  clangASTMatchers
   clangEdit
   clangRewrite
   clangRewriteFrontend
   clangSerialization
+  clangAPINotes
   clangAST
   clangBasic
   clangLex
+  clangSupport
 )

 set(LLVM_LINK_COMPONENTS
@@ -29,6 +32,8 @@ set(LLVM_LINK_COMPONENTS
   coroutines
   coverage
   executionengine
+  FrontendDriver
+  FrontendHLSL
   ipo
   jitlink
   lto

However, this is incorrect because it just specifies the missing transitive dependencies. The proper fix is to correctly load ClangConfig.cmake which specifies the library targets and their dependencies.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions