summaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@freebsd.org>2012-12-13 16:09:42 +0000
committerRoman Divacky <rdivacky@freebsd.org>2012-12-13 16:09:42 +0000
commitfc2929fdb7cce47daf5b2857a56013fad0257cb6 (patch)
tree8a743249938d975d1e37653bf1f0f8d8eb7b6647 /lib/Makefile
parent702baef6d636004db1a0bb6aa34b664650e594f6 (diff)
downloadclang-fc2929fdb7cce47daf5b2857a56013fad0257cb6.tar.gz
Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user
specifies not to. Dont build ASTMatchers with Rewriter disabled and StaticAnalyzer when it's disabled. Without all those three, the clang binary shrinks (x86_64) from ~36MB to ~32MB (unstripped). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Makefile')
-rwxr-xr-xlib/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 17db50e8cd..2e32dfec35 100755
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -8,9 +8,19 @@
##===----------------------------------------------------------------------===##
CLANG_LEVEL := ..
-PARALLEL_DIRS = Headers Basic Lex Parse AST ASTMatchers Sema CodeGen Analysis \
- StaticAnalyzer Edit Rewrite ARCMigrate Serialization Frontend \
- FrontendTool Tooling Driver Format
+# ARCMigrate and Rewrite are always needed because of libclang.
+PARALLEL_DIRS = Headers Basic Lex Parse AST Sema CodeGen Analysis Frontend \
+ FrontendTool Tooling Driver Format Edit ARCMigrate Rewrite \
+ Serialization
-include $(CLANG_LEVEL)/Makefile
+include $(CLANG_LEVEL)/../../Makefile.config
+
+ifeq ($(ENABLE_CLANG_REWRITER),1)
+PARALLEL_DIRS += ASTMatchers
+endif
+ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
+PARALLEL_DIRS += StaticAnalyzer
+endif
+
+include $(CLANG_LEVEL)/Makefile