flang/link-against-libclang-cpp.patch
2022-09-09 09:48:45 +02:00

85 lines
2.4 KiB
Diff

From 5271cef46c00f144875396947a090ceed803cd2d Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Thu, 4 Aug 2022 12:56:34 +0200
Subject: [PATCH] Link against libclang-cpp
---
flang/lib/Frontend/CMakeLists.txt | 5 ++---
flang/lib/FrontendTool/CMakeLists.txt | 5 ++---
flang/tools/flang-driver/CMakeLists.txt | 3 +--
flang/unittests/Frontend/CMakeLists.txt | 2 +-
4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/flang/lib/Frontend/CMakeLists.txt b/flang/lib/Frontend/CMakeLists.txt
index 96769c707f10..3e311875c8c6 100644
--- a/flang/lib/Frontend/CMakeLists.txt
+++ b/flang/lib/Frontend/CMakeLists.txt
@@ -12,7 +12,7 @@ add_flang_library(flangFrontend
TextDiagnostic.cpp
DEPENDS
- clangBasic
+ clang-cpp
FIRBuilder
FIRDialect
FIRSupport
@@ -26,8 +26,7 @@ add_flang_library(flangFrontend
FortranEvaluate
FortranCommon
FortranLower
- clangBasic
- clangDriver
+ clang-cpp
FIRDialect
FIRSupport
FIRBuilder
diff --git a/flang/lib/FrontendTool/CMakeLists.txt b/flang/lib/FrontendTool/CMakeLists.txt
index 0753313d7342..7482f74dba51 100644
--- a/flang/lib/FrontendTool/CMakeLists.txt
+++ b/flang/lib/FrontendTool/CMakeLists.txt
@@ -5,12 +5,11 @@ add_flang_library(flangFrontendTool
# This makes sure that the MLIR dependencies of flangFrontend (which are
# transitively required here) are generated before this target is build.
flangFrontend
- clangBasic
+ clang-cpp
LINK_LIBS
flangFrontend
- clangBasic
- clangDriver
+ clang-cpp
MLIRPass
LINK_COMPONENTS
diff --git a/flang/tools/flang-driver/CMakeLists.txt b/flang/tools/flang-driver/CMakeLists.txt
index 94c8ce6d58f1..c11b677a62e9 100644
--- a/flang/tools/flang-driver/CMakeLists.txt
+++ b/flang/tools/flang-driver/CMakeLists.txt
@@ -31,8 +31,7 @@ target_link_libraries(flang-new
clang_target_link_libraries(flang-new
PRIVATE
- clangDriver
- clangBasic
+ clang-cpp
)
option(FLANG_PLUGIN_SUPPORT "Build Flang with plugin support." ON)
diff --git a/flang/unittests/Frontend/CMakeLists.txt b/flang/unittests/Frontend/CMakeLists.txt
index 739412c7888c..a4430dc2c59a 100644
--- a/flang/unittests/Frontend/CMakeLists.txt
+++ b/flang/unittests/Frontend/CMakeLists.txt
@@ -9,7 +9,7 @@ add_flang_unittest(FlangFrontendTests
target_link_libraries(FlangFrontendTests
PRIVATE
- clangBasic
+ clang-cpp
flangFrontend
flangFrontendTool
FortranParser
--
2.37.1