aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2011-02-11 23:46:38 +0000
committerJeffrey Yasskin <jyasskin@google.com>2011-02-11 23:46:38 +0000
commit0a86d44703fc5cd3cd38ea1708176f5b44321ed8 (patch)
tree78e022ccebc6e4e69d34ecf4b50afcb5c1ed8ee2
parent848ec83483ca4ba52ed72c7e29ebc330f8c87252 (diff)
Add CMake dependencies so that LLVM_USED_LIBS order doesn't matter.
I also sorted the tools/driver dependencies since their order no longer matters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125417 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/CMakeLists.txt2
-rw-r--r--lib/Basic/CMakeLists.txt2
-rw-r--r--lib/CodeGen/CMakeLists.txt7
-rw-r--r--lib/Frontend/CMakeLists.txt7
-rw-r--r--lib/Lex/CMakeLists.txt2
-rw-r--r--lib/Serialization/CMakeLists.txt3
-rw-r--r--lib/StaticAnalyzer/Core/CMakeLists.txt2
-rw-r--r--tools/driver/CMakeLists.txt20
8 files changed, 31 insertions, 14 deletions
diff --git a/lib/AST/CMakeLists.txt b/lib/AST/CMakeLists.txt
index e767ebcb3a..9fe18407a8 100644
--- a/lib/AST/CMakeLists.txt
+++ b/lib/AST/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(LLVM_LINK_COMPONENTS support)
+
set(LLVM_USED_LIBS clangBasic)
add_clang_library(clangAST
diff --git a/lib/Basic/CMakeLists.txt b/lib/Basic/CMakeLists.txt
index 0a28fbc377..91e7deb078 100644
--- a/lib/Basic/CMakeLists.txt
+++ b/lib/Basic/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(LLVM_LINK_COMPONENTS mc)
+
add_clang_library(clangBasic
Builtins.cpp
ConvertUTF.c
diff --git a/lib/CodeGen/CMakeLists.txt b/lib/CodeGen/CMakeLists.txt
index 7aa6b15781..8c20f29903 100644
--- a/lib/CodeGen/CMakeLists.txt
+++ b/lib/CodeGen/CMakeLists.txt
@@ -1,3 +1,10 @@
+set(LLVM_LINK_COMPONENTS
+ asmparser
+ bitreader
+ bitwriter
+ ipo
+ )
+
set(LLVM_USED_LIBS clangBasic clangAST clangFrontend)
add_clang_library(clangCodeGen
diff --git a/lib/Frontend/CMakeLists.txt b/lib/Frontend/CMakeLists.txt
index 9a53ad6e53..9f197b4f87 100644
--- a/lib/Frontend/CMakeLists.txt
+++ b/lib/Frontend/CMakeLists.txt
@@ -1,10 +1,11 @@
set( LLVM_USED_LIBS
+ clangAST
+ clangBasic
clangDriver
+ clangLex
clangParse
clangSema
- clangAST
- clangLex
- clangBasic
+ clangSerialization
)
add_clang_library(clangFrontend
diff --git a/lib/Lex/CMakeLists.txt b/lib/Lex/CMakeLists.txt
index 417ad96840..80e2820101 100644
--- a/lib/Lex/CMakeLists.txt
+++ b/lib/Lex/CMakeLists.txt
@@ -1,5 +1,7 @@
# TODO: Add -maltivec when ARCH is PowerPC.
+set(LLVM_LINK_COMPONENTS support)
+
set(LLVM_USED_LIBS clangBasic)
add_clang_library(clangLex
diff --git a/lib/Serialization/CMakeLists.txt b/lib/Serialization/CMakeLists.txt
index f8c67989a4..10c8904b7a 100644
--- a/lib/Serialization/CMakeLists.txt
+++ b/lib/Serialization/CMakeLists.txt
@@ -1,4 +1,5 @@
-set(LLVM_USED_LIBS clangFrontend)
+# TODO: This must need some dependencies, but it builds fine without them.
+#set(LLVM_USED_LIBS ???)
add_clang_library(clangSerialization
GeneratePCH.cpp
diff --git a/lib/StaticAnalyzer/Core/CMakeLists.txt b/lib/StaticAnalyzer/Core/CMakeLists.txt
index 828613003c..a5996ba05e 100644
--- a/lib/StaticAnalyzer/Core/CMakeLists.txt
+++ b/lib/StaticAnalyzer/Core/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(LLVM_LINK_COMPONENTS support)
+
set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite)
add_clang_library(clangStaticAnalyzerCore
diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt
index e38bb3768a..d948eb93f5 100644
--- a/tools/driver/CMakeLists.txt
+++ b/tools/driver/CMakeLists.txt
@@ -1,19 +1,19 @@
set( LLVM_USED_LIBS
- clangFrontendTool
- clangFrontend
- clangDriver
- clangSerialization
+ clangAST
+ clangAnalysis
+ clangBasic
clangCodeGen
+ clangDriver
+ clangFrontend
+ clangFrontendTool
+ clangIndex
+ clangLex
clangParse
+ clangRewrite
clangSema
+ clangSerialization
clangStaticAnalyzerCheckers
clangStaticAnalyzerCore
- clangAnalysis
- clangIndex
- clangRewrite
- clangAST
- clangLex
- clangBasic
)
set( LLVM_LINK_COMPONENTS