aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-02-02 22:28:29 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-02-02 22:28:29 +0000
commitdf5d2454a3de65e6d384933806fff133d660758f (patch)
treeb320740864f58d26808c8eb2bee05df3b8c3b774 /usr.bin
parent757224cbdb0fcca663b2e7e42835db61eecca4b9 (diff)
downloadsrc-df5d2454a3de65e6d384933806fff133d660758f.tar.gz
src-df5d2454a3de65e6d384933806fff133d660758f.zip
Pull in r170135 from upstream clang trunk:
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). To disable these clang components, and get a smaller clang binary built and installed, set WITHOUT_CLANG_FULL in src.conf(5). During the initial stages of buildworld, those extra components are already disabled automatically, to save some build time. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=246259
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/clang/clang/Makefile22
1 files changed, 16 insertions, 6 deletions
diff --git a/usr.bin/clang/clang/Makefile b/usr.bin/clang/clang/Makefile
index 6fa9b802d8e1..18a768be849e 100644
--- a/usr.bin/clang/clang/Makefile
+++ b/usr.bin/clang/clang/Makefile
@@ -35,6 +35,19 @@ TGHDRS= CC1AsOptions \
DiagnosticLexKinds \
DiagnosticSemaKinds \
Options
+
+.if !defined(EARLY_BUILD) && defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no"
+_clangstaticanalyzer= \
+ clangstaticanalyzerfrontend \
+ clangstaticanalyzercheckers \
+ clangstaticanalyzercore
+_clangarcmigrate= \
+ clangarcmigrate
+_clangrewriter= \
+ clangrewritefrontend \
+ clangrewritecore
+.endif # !EARLY_BUILD && MK_CLANG_FULL
+
LIBDEPS=clangfrontendtool \
clangfrontend \
clangdriver \
@@ -42,13 +55,10 @@ LIBDEPS=clangfrontendtool \
clangcodegen \
clangparse \
clangsema \
- clangstaticanalyzerfrontend \
- clangstaticanalyzercheckers \
- clangstaticanalyzercore \
+ ${_clangstaticanalyzer} \
clanganalysis \
- clangarcmigrate \
- clangrewritefrontend \
- clangrewritecore \
+ ${_clangarcmigrate} \
+ ${_clangrewriter} \
clangedit \
clangast \
clanglex \