Skip to content

[cmake] APIDigester, IDE: Specify Clang link dependencies #83645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions include/swift/APIDigester/ModuleAnalyzerNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
#ifndef __SWIFT_ABI_DIGESTER_MODULE_NODES_H__
#define __SWIFT_ABI_DIGESTER_MODULE_NODES_H__

#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclObjC.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Sema.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/CommandLine.h"
Expand Down
6 changes: 6 additions & 0 deletions lib/APIDigester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ add_swift_host_library(swiftAPIDigester STATIC
target_link_libraries(swiftAPIDigester PRIVATE
swiftIDE)

# Clang dependencies. These are private because APIDigester's public
# interface does not use Clang symbols.
target_link_libraries(swiftAPIDigester PRIVATE
clangAST
clangLex)

set_swift_llvm_is_available(swiftAPIDigester)
2 changes: 2 additions & 0 deletions lib/APIDigester/ModuleAnalyzerNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "swift/Basic/Defer.h"
#include "swift/Parse/Lexer.h"
#include "swift/Sema/IDETypeChecking.h"
#include "clang/AST/DeclObjC.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/STLExtras.h"
#include <algorithm>
#include <swift/APIDigester/ModuleAnalyzerNodes.h>
Expand Down
8 changes: 8 additions & 0 deletions lib/IDE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ target_link_libraries(swiftIDE PRIVATE
swiftParse
swiftSema)

# Clang dependencies. These are private because IDE's public
# interface does not use Clang symbols.
target_link_libraries(swiftIDE PRIVATE
clangAST
clangBasic
clangIndex
clangLex)

if (SWIFT_BUILD_SWIFT_SYNTAX)
target_link_libraries(swiftIDE PRIVATE
swiftIDEUtilsBridging
Expand Down