svn commit: r246637 - in stable/9: contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/tools/clang/lib/FrontendTool lib/clang lib/clang/libclanganalysis lib/clang/libclangarcmigrate lib/clang...

Dimitry Andric dim at FreeBSD.org
Sun Feb 10 21:25:02 UTC 2013


Author: dim
Date: Sun Feb 10 21:24:47 2013
New Revision: 246637
URL: http://svnweb.freebsd.org/changeset/base/246637

Log:
  MFC r246259:
  
  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.

Added:
  stable/9/tools/build/options/WITHOUT_CLANG_FULL
     - copied unchanged from r246259, head/tools/build/options/WITHOUT_CLANG_FULL
  stable/9/tools/build/options/WITH_CLANG_FULL
     - copied unchanged from r246259, head/tools/build/options/WITH_CLANG_FULL
Modified:
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td
  stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
  stable/9/lib/clang/Makefile
  stable/9/lib/clang/clang.build.mk
  stable/9/lib/clang/libclanganalysis/Makefile
  stable/9/lib/clang/libclangarcmigrate/Makefile
  stable/9/lib/clang/libclangast/Makefile
  stable/9/lib/clang/libclangbasic/Makefile
  stable/9/lib/clang/libclangcodegen/Makefile
  stable/9/lib/clang/libclangdriver/Makefile
  stable/9/lib/clang/libclangedit/Makefile
  stable/9/lib/clang/libclangfrontend/Makefile
  stable/9/lib/clang/libclangfrontendtool/Makefile
  stable/9/lib/clang/libclanglex/Makefile
  stable/9/lib/clang/libclangparse/Makefile
  stable/9/lib/clang/libclangrewritecore/Makefile
  stable/9/lib/clang/libclangrewritefrontend/Makefile
  stable/9/lib/clang/libclangsema/Makefile
  stable/9/lib/clang/libclangserialization/Makefile
  stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile
  stable/9/lib/clang/libclangstaticanalyzercore/Makefile
  stable/9/lib/clang/libclangstaticanalyzerfrontend/Makefile
  stable/9/lib/clang/libllvmarchive/Makefile
  stable/9/lib/clang/libllvmarmasmparser/Makefile
  stable/9/lib/clang/libllvmarmcodegen/Makefile
  stable/9/lib/clang/libllvmarmdesc/Makefile
  stable/9/lib/clang/libllvmarmdisassembler/Makefile
  stable/9/lib/clang/libllvmarminfo/Makefile
  stable/9/lib/clang/libllvmarminstprinter/Makefile
  stable/9/lib/clang/libllvmasmparser/Makefile
  stable/9/lib/clang/libllvmasmprinter/Makefile
  stable/9/lib/clang/libllvmbitreader/Makefile
  stable/9/lib/clang/libllvmbitwriter/Makefile
  stable/9/lib/clang/libllvmcodegen/Makefile
  stable/9/lib/clang/libllvmcore/Makefile
  stable/9/lib/clang/libllvmdebuginfo/Makefile
  stable/9/lib/clang/libllvmexecutionengine/Makefile
  stable/9/lib/clang/libllvminstcombine/Makefile
  stable/9/lib/clang/libllvminstrumentation/Makefile
  stable/9/lib/clang/libllvminterpreter/Makefile
  stable/9/lib/clang/libllvmjit/Makefile
  stable/9/lib/clang/libllvmlinker/Makefile
  stable/9/lib/clang/libllvmmcdisassembler/Makefile
  stable/9/lib/clang/libllvmmcparser/Makefile
  stable/9/lib/clang/libllvmmipsasmparser/Makefile
  stable/9/lib/clang/libllvmmipscodegen/Makefile
  stable/9/lib/clang/libllvmmipsdesc/Makefile
  stable/9/lib/clang/libllvmmipsdisassembler/Makefile
  stable/9/lib/clang/libllvmmipsinfo/Makefile
  stable/9/lib/clang/libllvmmipsinstprinter/Makefile
  stable/9/lib/clang/libllvmobject/Makefile
  stable/9/lib/clang/libllvmpowerpccodegen/Makefile
  stable/9/lib/clang/libllvmpowerpcdesc/Makefile
  stable/9/lib/clang/libllvmpowerpcinfo/Makefile
  stable/9/lib/clang/libllvmpowerpcinstprinter/Makefile
  stable/9/lib/clang/libllvmruntimedyld/Makefile
  stable/9/lib/clang/libllvmselectiondag/Makefile
  stable/9/lib/clang/libllvmtablegen/Makefile
  stable/9/lib/clang/libllvmtarget/Makefile
  stable/9/lib/clang/libllvmvectorize/Makefile
  stable/9/lib/clang/libllvmx86asmparser/Makefile
  stable/9/lib/clang/libllvmx86codegen/Makefile
  stable/9/lib/clang/libllvmx86desc/Makefile
  stable/9/lib/clang/libllvmx86info/Makefile
  stable/9/lib/clang/libllvmx86instprinter/Makefile
  stable/9/lib/clang/libllvmx86utils/Makefile
  stable/9/share/mk/bsd.own.mk
  stable/9/usr.bin/clang/clang/Makefile
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)
  stable/9/lib/clang/   (props changed)
  stable/9/share/mk/   (props changed)
  stable/9/tools/build/   (props changed)
  stable/9/tools/build/options/   (props changed)
  stable/9/usr.bin/clang/   (props changed)

Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td
==============================================================================
--- stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td	Sun Feb 10 21:24:47 2013	(r246637)
@@ -60,6 +60,8 @@ def warn_fe_cc_log_diagnostics_failure :
     "unable to open CC_LOG_DIAGNOSTICS file: %0 (using stderr)">;
 def err_fe_no_pch_in_dir : Error<
     "no suitable precompiled header file found in directory '%0'">;
+def err_fe_action_not_available : Error<
+    "action %0 not compiled in">;
 
 def warn_fe_serialized_diag_failure : Warning<
     "unable to open file %0 for serializing diagnostics (%1)">,

Modified: stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
==============================================================================
--- stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp	Sun Feb 10 21:24:47 2013	(r246637)
@@ -31,6 +31,7 @@ using namespace clang;
 
 static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) {
   using namespace clang::frontend;
+  StringRef Action("unknown");
 
   switch (CI.getFrontendOpts().ProgramAction) {
   case ASTDeclList:            return new ASTDeclListAction();
@@ -42,12 +43,20 @@ static FrontendAction *CreateFrontendBas
   case DumpTokens:             return new DumpTokensAction();
   case EmitAssembly:           return new EmitAssemblyAction();
   case EmitBC:                 return new EmitBCAction();
+#ifdef CLANG_ENABLE_REWRITER
   case EmitHTML:               return new HTMLPrintAction();
+#else
+  case EmitHTML:               Action = "EmitHTML"; break;
+#endif
   case EmitLLVM:               return new EmitLLVMAction();
   case EmitLLVMOnly:           return new EmitLLVMOnlyAction();
   case EmitCodeGenOnly:        return new EmitCodeGenOnlyAction();
   case EmitObj:                return new EmitObjAction();
+#ifdef CLANG_ENABLE_REWRITER
   case FixIt:                  return new FixItAction();
+#else
+  case FixIt:                  Action = "FixIt"; break;
+#endif
   case GenerateModule:         return new GenerateModuleAction;
   case GeneratePCH:            return new GeneratePCHAction;
   case GeneratePTH:            return new GeneratePTHAction();
@@ -74,19 +83,46 @@ static FrontendAction *CreateFrontendBas
   case PrintDeclContext:       return new DeclContextPrintAction();
   case PrintPreamble:          return new PrintPreambleAction();
   case PrintPreprocessedInput: {
-    if (CI.getPreprocessorOutputOpts().RewriteIncludes)
+    if (CI.getPreprocessorOutputOpts().RewriteIncludes) {
+#ifdef CLANG_ENABLE_REWRITER
       return new RewriteIncludesAction();
+#else
+      Action = "RewriteIncludesAction";
+      break;
+#endif
+    }
     return new PrintPreprocessedAction();
   }
 
+#ifdef CLANG_ENABLE_REWRITER
   case RewriteMacros:          return new RewriteMacrosAction();
   case RewriteObjC:            return new RewriteObjCAction();
   case RewriteTest:            return new RewriteTestAction();
-  case RunAnalysis:            return new ento::AnalysisAction();
+#else
+  case RewriteMacros:          Action = "RewriteMacros"; break;
+  case RewriteObjC:            Action = "RewriteObjC"; break;
+  case RewriteTest:            Action = "RewriteTest"; break;
+#endif
+#ifdef CLANG_ENABLE_ARCMT
   case MigrateSource:          return new arcmt::MigrateSourceAction();
+#else
+  case MigrateSource:          Action = "MigrateSource"; break;
+#endif
+#ifdef CLANG_ENABLE_STATIC_ANALYZER
+  case RunAnalysis:            return new ento::AnalysisAction();
+#else
+  case RunAnalysis:            Action = "RunAnalysis"; break;
+#endif
   case RunPreprocessorOnly:    return new PreprocessOnlyAction();
   }
+
+#if !defined(CLANG_ENABLE_ARCMT) || !defined(CLANG_ENABLE_STATIC_ANALYZER) \
+  || !defined(CLANG_ENABLE_REWRITER)
+  CI.getDiagnostics().Report(diag::err_fe_action_not_available) << Action;
+  return 0;
+#else
   llvm_unreachable("Invalid program action!");
+#endif
 }
 
 static FrontendAction *CreateFrontendAction(CompilerInstance &CI) {
@@ -97,10 +133,13 @@ static FrontendAction *CreateFrontendAct
 
   const FrontendOptions &FEOpts = CI.getFrontendOpts();
 
+#ifdef CLANG_ENABLE_REWRITER
   if (FEOpts.FixAndRecompile) {
     Act = new FixItRecompile(Act);
   }
+#endif
   
+#ifdef CLANG_ENABLE_ARCMT
   // Potentially wrap the base FE action in an ARC Migrate Tool action.
   switch (FEOpts.ARCMTAction) {
   case FrontendOptions::ARCMT_None:
@@ -124,6 +163,7 @@ static FrontendAction *CreateFrontendAct
                    FEOpts.ObjCMTAction & ~FrontendOptions::ObjCMT_Literals,
                    FEOpts.ObjCMTAction & ~FrontendOptions::ObjCMT_Subscripting);
   }
+#endif
 
   // If there are any AST files to merge, create a frontend action
   // adaptor to perform the merge.
@@ -176,12 +216,14 @@ bool clang::ExecuteCompilerInvocation(Co
     llvm::cl::ParseCommandLineOptions(NumArgs + 1, Args);
   }
 
+#ifdef CLANG_ENABLE_STATIC_ANALYZER
   // Honor -analyzer-checker-help.
   // This should happen AFTER plugins have been loaded!
   if (Clang->getAnalyzerOpts()->ShowCheckerHelp) {
     ento::printCheckerHelp(llvm::outs(), Clang->getFrontendOpts().Plugins);
     return 0;
   }
+#endif
 
   // If there were errors in processing arguments, don't do anything else.
   bool Success = false;

Modified: stable/9/lib/clang/Makefile
==============================================================================
--- stable/9/lib/clang/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -3,8 +3,20 @@
 .include <bsd.own.mk>
 
 .if !make(install)
+.if !defined(EARLY_BUILD) && defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no"
+_libclangstaticanalyzer= \
+	libclangstaticanalyzercheckers \
+	libclangstaticanalyzercore \
+	libclangstaticanalyzerfrontend
+_libclangarcmigrate= \
+	libclangarcmigrate
+_libclangrewriter= \
+	libclangrewritecore \
+	libclangrewritefrontend
+.endif # !EARLY_BUILD && MK_CLANG_FULL
+
 SUBDIR=	libclanganalysis \
-	libclangarcmigrate \
+	${_libclangarcmigrate} \
 	libclangast \
 	libclangbasic \
 	libclangcodegen \
@@ -14,13 +26,10 @@ SUBDIR=	libclanganalysis \
 	libclangfrontendtool \
 	libclanglex \
 	libclangparse \
-	libclangrewritecore \
-	libclangrewritefrontend \
+	${_libclangrewriter} \
 	libclangsema \
 	libclangserialization \
-	libclangstaticanalyzercheckers \
-	libclangstaticanalyzercore \
-	libclangstaticanalyzerfrontend \
+	${_libclangstaticanalyzer} \
 	\
 	libllvmanalysis \
 	libllvmarchive \
@@ -78,8 +87,8 @@ SUBDIR+=libllvmdebuginfo \
 	libllvmmcdisassembler \
 	libllvmmcjit \
 	libllvmruntimedyld
-.endif
-.endif
+.endif # MK_CLANG_EXTRAS
+.endif # !make(install)
 
 SUBDIR+= include
 

Modified: stable/9/lib/clang/clang.build.mk
==============================================================================
--- stable/9/lib/clang/clang.build.mk	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/clang.build.mk	Sun Feb 10 21:24:47 2013	(r246637)
@@ -8,6 +8,12 @@ CFLAGS+=	-I${LLVM_SRCS}/include -I${CLAN
 		-DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \
 		-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG
 
+.if !defined(EARLY_BUILD) && defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no"
+CFLAGS+=	-DCLANG_ENABLE_ARCMT \
+		-DCLANG_ENABLE_REWRITER \
+		-DCLANG_ENABLE_STATIC_ANALYZER
+.endif # !EARLY_BUILD && MK_CLANG_FULL
+
 # LLVM is not strict aliasing safe as of 12/31/2011
 CFLAGS+= -fno-strict-aliasing
 

Modified: stable/9/lib/clang/libclanganalysis/Makefile
==============================================================================
--- stable/9/lib/clang/libclanganalysis/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclanganalysis/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clanganalysis
 
 SRCDIR=	tools/clang/lib/Analysis

Modified: stable/9/lib/clang/libclangarcmigrate/Makefile
==============================================================================
--- stable/9/lib/clang/libclangarcmigrate/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangarcmigrate/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangarcmigrate
 
 SRCDIR=	tools/clang/lib/ARCMigrate

Modified: stable/9/lib/clang/libclangast/Makefile
==============================================================================
--- stable/9/lib/clang/libclangast/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangast/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangast
 
 SRCDIR=	tools/clang/lib/AST

Modified: stable/9/lib/clang/libclangbasic/Makefile
==============================================================================
--- stable/9/lib/clang/libclangbasic/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangbasic/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangbasic
 
 SRCDIR=	tools/clang/lib/Basic

Modified: stable/9/lib/clang/libclangcodegen/Makefile
==============================================================================
--- stable/9/lib/clang/libclangcodegen/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangcodegen/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangcodegen
 
 SRCDIR=	tools/clang/lib/CodeGen

Modified: stable/9/lib/clang/libclangdriver/Makefile
==============================================================================
--- stable/9/lib/clang/libclangdriver/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangdriver/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangdriver
 
 SRCDIR=	tools/clang/lib/Driver

Modified: stable/9/lib/clang/libclangedit/Makefile
==============================================================================
--- stable/9/lib/clang/libclangedit/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangedit/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangedit
 
 SRCDIR=	tools/clang/lib/Edit

Modified: stable/9/lib/clang/libclangfrontend/Makefile
==============================================================================
--- stable/9/lib/clang/libclangfrontend/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangfrontend/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangfrontend
 
 SRCDIR=	tools/clang/lib/Frontend

Modified: stable/9/lib/clang/libclangfrontendtool/Makefile
==============================================================================
--- stable/9/lib/clang/libclangfrontendtool/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangfrontendtool/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangfrontendtool
 
 SRCDIR=	tools/clang/lib/FrontendTool

Modified: stable/9/lib/clang/libclanglex/Makefile
==============================================================================
--- stable/9/lib/clang/libclanglex/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclanglex/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clanglex
 
 SRCDIR=	tools/clang/lib/Lex

Modified: stable/9/lib/clang/libclangparse/Makefile
==============================================================================
--- stable/9/lib/clang/libclangparse/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangparse/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangparse
 
 SRCDIR=	tools/clang/lib/Parse

Modified: stable/9/lib/clang/libclangrewritecore/Makefile
==============================================================================
--- stable/9/lib/clang/libclangrewritecore/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangrewritecore/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangrewritecore
 
 SRCDIR=	tools/clang/lib/Rewrite/Core

Modified: stable/9/lib/clang/libclangrewritefrontend/Makefile
==============================================================================
--- stable/9/lib/clang/libclangrewritefrontend/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangrewritefrontend/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangrewritefrontend
 
 SRCDIR=	tools/clang/lib/Rewrite/Frontend

Modified: stable/9/lib/clang/libclangsema/Makefile
==============================================================================
--- stable/9/lib/clang/libclangsema/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangsema/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangsema
 
 SRCDIR=	tools/clang/lib/Sema

Modified: stable/9/lib/clang/libclangserialization/Makefile
==============================================================================
--- stable/9/lib/clang/libclangserialization/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangserialization/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangserialization
 
 SRCDIR=	tools/clang/lib/Serialization

Modified: stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile
==============================================================================
--- stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangstaticanalyzercheckers
 
 SRCDIR=	tools/clang/lib/StaticAnalyzer/Checkers

Modified: stable/9/lib/clang/libclangstaticanalyzercore/Makefile
==============================================================================
--- stable/9/lib/clang/libclangstaticanalyzercore/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangstaticanalyzercore/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangstaticanalyzercore
 
 SRCDIR=	tools/clang/lib/StaticAnalyzer/Core

Modified: stable/9/lib/clang/libclangstaticanalyzerfrontend/Makefile
==============================================================================
--- stable/9/lib/clang/libclangstaticanalyzerfrontend/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libclangstaticanalyzerfrontend/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	clangstaticanalyzerfrontend
 
 SRCDIR=	tools/clang/lib/StaticAnalyzer/Frontend

Modified: stable/9/lib/clang/libllvmarchive/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmarchive/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmarchive/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmarchive
 
 SRCDIR=	lib/Archive

Modified: stable/9/lib/clang/libllvmarmasmparser/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmarmasmparser/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmarmasmparser/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmarmasmparser
 
 SRCDIR=	lib/Target/ARM/AsmParser

Modified: stable/9/lib/clang/libllvmarmcodegen/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmarmcodegen/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmarmcodegen/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmarmcodegen
 
 SRCDIR=	lib/Target/ARM

Modified: stable/9/lib/clang/libllvmarmdesc/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmarmdesc/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmarmdesc/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmarmdesc
 
 SRCDIR=	lib/Target/ARM/MCTargetDesc

Modified: stable/9/lib/clang/libllvmarmdisassembler/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmarmdisassembler/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmarmdisassembler/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmarmdisassembler
 
 SRCDIR=	lib/Target/ARM/Disassembler

Modified: stable/9/lib/clang/libllvmarminfo/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmarminfo/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmarminfo/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmarminfo
 
 SRCDIR=	lib/Target/ARM/TargetInfo

Modified: stable/9/lib/clang/libllvmarminstprinter/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmarminstprinter/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmarminstprinter/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmarminstprinter
 
 SRCDIR=	lib/Target/ARM/InstPrinter

Modified: stable/9/lib/clang/libllvmasmparser/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmasmparser/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmasmparser/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmasmparser
 
 SRCDIR=	lib/AsmParser

Modified: stable/9/lib/clang/libllvmasmprinter/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmasmprinter/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmasmprinter/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmasmprinter
 
 SRCDIR=	lib/CodeGen/AsmPrinter

Modified: stable/9/lib/clang/libllvmbitreader/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmbitreader/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmbitreader/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmbitreader
 
 SRCDIR=	lib/Bitcode/Reader

Modified: stable/9/lib/clang/libllvmbitwriter/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmbitwriter/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmbitwriter/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmbitwriter
 
 SRCDIR=	lib/Bitcode/Writer

Modified: stable/9/lib/clang/libllvmcodegen/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmcodegen/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmcodegen/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmcodegen
 
 SRCDIR=	lib/CodeGen

Modified: stable/9/lib/clang/libllvmcore/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmcore/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmcore/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmcore
 
 SRCDIR=	lib/VMCore

Modified: stable/9/lib/clang/libllvmdebuginfo/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmdebuginfo/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmdebuginfo/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmdebuginfo
 
 SRCDIR=	lib/DebugInfo

Modified: stable/9/lib/clang/libllvmexecutionengine/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmexecutionengine/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmexecutionengine/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmexecutionengine
 
 SRCDIR=	lib/ExecutionEngine

Modified: stable/9/lib/clang/libllvminstcombine/Makefile
==============================================================================
--- stable/9/lib/clang/libllvminstcombine/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvminstcombine/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvminstcombine
 
 SRCDIR=	lib/Transforms/InstCombine

Modified: stable/9/lib/clang/libllvminstrumentation/Makefile
==============================================================================
--- stable/9/lib/clang/libllvminstrumentation/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvminstrumentation/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvminstrumentation
 
 SRCDIR=	lib/Transforms/Instrumentation

Modified: stable/9/lib/clang/libllvminterpreter/Makefile
==============================================================================
--- stable/9/lib/clang/libllvminterpreter/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvminterpreter/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvminterpreter
 
 SRCDIR=	lib/ExecutionEngine/Interpreter

Modified: stable/9/lib/clang/libllvmjit/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmjit/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmjit/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmjit
 
 SRCDIR=	lib/ExecutionEngine/JIT

Modified: stable/9/lib/clang/libllvmlinker/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmlinker/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmlinker/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmlinker
 
 SRCDIR=	lib/Linker

Modified: stable/9/lib/clang/libllvmmcdisassembler/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmcdisassembler/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmcdisassembler/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmcdisassembler
 
 SRCDIR=	lib/MC/MCDisassembler

Modified: stable/9/lib/clang/libllvmmcparser/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmcparser/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmcparser/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmcparser
 
 SRCDIR=	lib/MC/MCParser

Modified: stable/9/lib/clang/libllvmmipsasmparser/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmipsasmparser/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmipsasmparser/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmipsasmparser
 
 SRCDIR=	lib/Target/Mips/AsmParser

Modified: stable/9/lib/clang/libllvmmipscodegen/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmipscodegen/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmipscodegen/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmipscodegen
 
 SRCDIR=	lib/Target/Mips

Modified: stable/9/lib/clang/libllvmmipsdesc/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmipsdesc/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmipsdesc/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmipsdesc
 
 SRCDIR=	lib/Target/Mips/MCTargetDesc

Modified: stable/9/lib/clang/libllvmmipsdisassembler/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmipsdisassembler/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmipsdisassembler/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmipsdisassembler
 
 SRCDIR=	lib/Target/Mips/Disassembler

Modified: stable/9/lib/clang/libllvmmipsinfo/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmipsinfo/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmipsinfo/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmipsinfo
 
 SRCDIR=	lib/Target/Mips/TargetInfo

Modified: stable/9/lib/clang/libllvmmipsinstprinter/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmmipsinstprinter/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmmipsinstprinter/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmmipsinstprinter
 
 SRCDIR=	lib/Target/Mips/InstPrinter

Modified: stable/9/lib/clang/libllvmobject/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmobject/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmobject/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmobject
 
 SRCDIR=	lib/Object

Modified: stable/9/lib/clang/libllvmpowerpccodegen/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmpowerpccodegen/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmpowerpccodegen/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmpowerpccodegen
 
 SRCDIR=	lib/Target/PowerPC

Modified: stable/9/lib/clang/libllvmpowerpcdesc/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmpowerpcdesc/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmpowerpcdesc/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmpowerpcdesc
 
 SRCDIR=	lib/Target/PowerPC/MCTargetDesc

Modified: stable/9/lib/clang/libllvmpowerpcinfo/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmpowerpcinfo/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmpowerpcinfo/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmpowerpcinfo
 
 SRCDIR=	lib/Target/PowerPC/TargetInfo

Modified: stable/9/lib/clang/libllvmpowerpcinstprinter/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmpowerpcinstprinter/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmpowerpcinstprinter/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmpowerpcinstprinter
 
 SRCDIR=	lib/Target/PowerPC/InstPrinter

Modified: stable/9/lib/clang/libllvmruntimedyld/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmruntimedyld/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmruntimedyld/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmruntimedyld
 
 SRCDIR=	lib/ExecutionEngine/RuntimeDyld

Modified: stable/9/lib/clang/libllvmselectiondag/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmselectiondag/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmselectiondag/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmselectiondag
 
 SRCDIR=	lib/CodeGen/SelectionDAG

Modified: stable/9/lib/clang/libllvmtablegen/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmtablegen/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmtablegen/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmtablegen
 
 SRCDIR=	lib/TableGen

Modified: stable/9/lib/clang/libllvmtarget/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmtarget/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmtarget/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmtarget
 
 SRCDIR=	lib/Target

Modified: stable/9/lib/clang/libllvmvectorize/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmvectorize/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmvectorize/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmvectorize
 
 SRCDIR=	lib/Transforms/Vectorize

Modified: stable/9/lib/clang/libllvmx86asmparser/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmx86asmparser/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmx86asmparser/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmx86asmparser
 
 SRCDIR=	lib/Target/X86/AsmParser

Modified: stable/9/lib/clang/libllvmx86codegen/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmx86codegen/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmx86codegen/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmx86codegen
 
 SRCDIR=	lib/Target/X86

Modified: stable/9/lib/clang/libllvmx86desc/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmx86desc/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmx86desc/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmx86desc
 
 SRCDIR=	lib/Target/X86/MCTargetDesc

Modified: stable/9/lib/clang/libllvmx86info/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmx86info/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmx86info/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmx86info
 
 SRCDIR=	lib/Target/X86/TargetInfo

Modified: stable/9/lib/clang/libllvmx86instprinter/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmx86instprinter/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmx86instprinter/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmx86instprinter
 
 SRCDIR=	lib/Target/X86/InstPrinter

Modified: stable/9/lib/clang/libllvmx86utils/Makefile
==============================================================================
--- stable/9/lib/clang/libllvmx86utils/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/lib/clang/libllvmx86utils/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 LIB=	llvmx86utils
 
 SRCDIR=	lib/Target/X86/Utils

Modified: stable/9/share/mk/bsd.own.mk
==============================================================================
--- stable/9/share/mk/bsd.own.mk	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/share/mk/bsd.own.mk	Sun Feb 10 21:24:47 2013	(r246637)
@@ -448,9 +448,9 @@ __T=${MACHINE_ARCH}
 .endif
 # Clang is only for x86 and powerpc right now, by default.
 .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*}
-__DEFAULT_YES_OPTIONS+=CLANG
+__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL
 .else
-__DEFAULT_NO_OPTIONS+=CLANG
+__DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL
 .endif
 # FDT is needed only for arm and powerpc
 .if ${__T:Marm*} || ${__T:Mpowerpc*}
@@ -579,6 +579,7 @@ MK_GDB:=	no
 
 .if ${MK_CLANG} == "no"
 MK_CLANG_EXTRAS:= no
+MK_CLANG_FULL:= no
 MK_CLANG_IS_CC:= no
 .endif
 

Copied: stable/9/tools/build/options/WITHOUT_CLANG_FULL (from r246259, head/tools/build/options/WITHOUT_CLANG_FULL)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/9/tools/build/options/WITHOUT_CLANG_FULL	Sun Feb 10 21:24:47 2013	(r246637, copy of r246259, head/tools/build/options/WITHOUT_CLANG_FULL)
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of
+the Clang C/C++ compiler.

Copied: stable/9/tools/build/options/WITH_CLANG_FULL (from r246259, head/tools/build/options/WITH_CLANG_FULL)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/9/tools/build/options/WITH_CLANG_FULL	Sun Feb 10 21:24:47 2013	(r246637, copy of r246259, head/tools/build/options/WITH_CLANG_FULL)
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the
+Clang C/C++ compiler.

Modified: stable/9/usr.bin/clang/clang/Makefile
==============================================================================
--- stable/9/usr.bin/clang/clang/Makefile	Sun Feb 10 20:08:33 2013	(r246636)
+++ stable/9/usr.bin/clang/clang/Makefile	Sun Feb 10 21:24:47 2013	(r246637)
@@ -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 \


More information about the svn-src-stable-9 mailing list