Date: Sat, 2 Feb 2013 22:28:30 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246259 - in head: contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/tools/clang/lib/FrontendTool lib/clang lib/clang/libclanganalysis lib/clang/libclangarcmigrate lib/clang/lib... Message-ID: <201302022228.r12MSU9p021594@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sat Feb 2 22:28:29 2013 New Revision: 246259 URL: http://svnweb.freebsd.org/changeset/base/246259 Log: 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 Added: head/tools/build/options/WITHOUT_CLANG_FULL (contents, props changed) head/tools/build/options/WITH_CLANG_FULL (contents, props changed) Modified: head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/libclanganalysis/Makefile head/lib/clang/libclangarcmigrate/Makefile head/lib/clang/libclangast/Makefile head/lib/clang/libclangbasic/Makefile head/lib/clang/libclangcodegen/Makefile head/lib/clang/libclangdriver/Makefile head/lib/clang/libclangedit/Makefile head/lib/clang/libclangfrontend/Makefile head/lib/clang/libclangfrontendtool/Makefile head/lib/clang/libclanglex/Makefile head/lib/clang/libclangparse/Makefile head/lib/clang/libclangrewritecore/Makefile head/lib/clang/libclangrewritefrontend/Makefile head/lib/clang/libclangsema/Makefile head/lib/clang/libclangserialization/Makefile head/lib/clang/libclangstaticanalyzercheckers/Makefile head/lib/clang/libclangstaticanalyzercore/Makefile head/lib/clang/libclangstaticanalyzerfrontend/Makefile head/lib/clang/libllvmarchive/Makefile head/lib/clang/libllvmarmasmparser/Makefile head/lib/clang/libllvmarmcodegen/Makefile head/lib/clang/libllvmarmdesc/Makefile head/lib/clang/libllvmarmdisassembler/Makefile head/lib/clang/libllvmarminfo/Makefile head/lib/clang/libllvmarminstprinter/Makefile head/lib/clang/libllvmasmparser/Makefile head/lib/clang/libllvmasmprinter/Makefile head/lib/clang/libllvmbitreader/Makefile head/lib/clang/libllvmbitwriter/Makefile head/lib/clang/libllvmcodegen/Makefile head/lib/clang/libllvmcore/Makefile head/lib/clang/libllvmdebuginfo/Makefile head/lib/clang/libllvmexecutionengine/Makefile head/lib/clang/libllvminstcombine/Makefile head/lib/clang/libllvminstrumentation/Makefile head/lib/clang/libllvminterpreter/Makefile head/lib/clang/libllvmjit/Makefile head/lib/clang/libllvmlinker/Makefile head/lib/clang/libllvmmcdisassembler/Makefile head/lib/clang/libllvmmcparser/Makefile head/lib/clang/libllvmmipsasmparser/Makefile head/lib/clang/libllvmmipscodegen/Makefile head/lib/clang/libllvmmipsdesc/Makefile head/lib/clang/libllvmmipsdisassembler/Makefile head/lib/clang/libllvmmipsinfo/Makefile head/lib/clang/libllvmmipsinstprinter/Makefile head/lib/clang/libllvmobject/Makefile head/lib/clang/libllvmpowerpccodegen/Makefile head/lib/clang/libllvmpowerpcdesc/Makefile head/lib/clang/libllvmpowerpcinfo/Makefile head/lib/clang/libllvmpowerpcinstprinter/Makefile head/lib/clang/libllvmruntimedyld/Makefile head/lib/clang/libllvmselectiondag/Makefile head/lib/clang/libllvmtablegen/Makefile head/lib/clang/libllvmtarget/Makefile head/lib/clang/libllvmvectorize/Makefile head/lib/clang/libllvmx86asmparser/Makefile head/lib/clang/libllvmx86codegen/Makefile head/lib/clang/libllvmx86desc/Makefile head/lib/clang/libllvmx86info/Makefile head/lib/clang/libllvmx86instprinter/Makefile head/lib/clang/libllvmx86utils/Makefile head/share/mk/bsd.own.mk head/usr.bin/clang/clang/Makefile Modified: head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td ============================================================================== --- head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td Sat Feb 2 22:23:45 2013 (r246258) +++ head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td Sat Feb 2 22:28:29 2013 (r246259) @@ -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: head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp Sat Feb 2 22:23:45 2013 (r246258) +++ head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp Sat Feb 2 22:28:29 2013 (r246259) @@ -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: head/lib/clang/Makefile ============================================================================== --- head/lib/clang/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -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: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/clang.build.mk Sat Feb 2 22:28:29 2013 (r246259) @@ -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: head/lib/clang/libclanganalysis/Makefile ============================================================================== --- head/lib/clang/libclanganalysis/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclanganalysis/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clanganalysis SRCDIR= tools/clang/lib/Analysis Modified: head/lib/clang/libclangarcmigrate/Makefile ============================================================================== --- head/lib/clang/libclangarcmigrate/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangarcmigrate/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangarcmigrate SRCDIR= tools/clang/lib/ARCMigrate Modified: head/lib/clang/libclangast/Makefile ============================================================================== --- head/lib/clang/libclangast/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangast/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangast SRCDIR= tools/clang/lib/AST Modified: head/lib/clang/libclangbasic/Makefile ============================================================================== --- head/lib/clang/libclangbasic/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangbasic/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangbasic SRCDIR= tools/clang/lib/Basic Modified: head/lib/clang/libclangcodegen/Makefile ============================================================================== --- head/lib/clang/libclangcodegen/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangcodegen/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangcodegen SRCDIR= tools/clang/lib/CodeGen Modified: head/lib/clang/libclangdriver/Makefile ============================================================================== --- head/lib/clang/libclangdriver/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangdriver/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangdriver SRCDIR= tools/clang/lib/Driver Modified: head/lib/clang/libclangedit/Makefile ============================================================================== --- head/lib/clang/libclangedit/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangedit/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangedit SRCDIR= tools/clang/lib/Edit Modified: head/lib/clang/libclangfrontend/Makefile ============================================================================== --- head/lib/clang/libclangfrontend/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangfrontend/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangfrontend SRCDIR= tools/clang/lib/Frontend Modified: head/lib/clang/libclangfrontendtool/Makefile ============================================================================== --- head/lib/clang/libclangfrontendtool/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangfrontendtool/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangfrontendtool SRCDIR= tools/clang/lib/FrontendTool Modified: head/lib/clang/libclanglex/Makefile ============================================================================== --- head/lib/clang/libclanglex/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclanglex/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clanglex SRCDIR= tools/clang/lib/Lex Modified: head/lib/clang/libclangparse/Makefile ============================================================================== --- head/lib/clang/libclangparse/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangparse/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangparse SRCDIR= tools/clang/lib/Parse Modified: head/lib/clang/libclangrewritecore/Makefile ============================================================================== --- head/lib/clang/libclangrewritecore/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangrewritecore/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangrewritecore SRCDIR= tools/clang/lib/Rewrite/Core Modified: head/lib/clang/libclangrewritefrontend/Makefile ============================================================================== --- head/lib/clang/libclangrewritefrontend/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangrewritefrontend/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangrewritefrontend SRCDIR= tools/clang/lib/Rewrite/Frontend Modified: head/lib/clang/libclangsema/Makefile ============================================================================== --- head/lib/clang/libclangsema/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangsema/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangsema SRCDIR= tools/clang/lib/Sema Modified: head/lib/clang/libclangserialization/Makefile ============================================================================== --- head/lib/clang/libclangserialization/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangserialization/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangserialization SRCDIR= tools/clang/lib/Serialization Modified: head/lib/clang/libclangstaticanalyzercheckers/Makefile ============================================================================== --- head/lib/clang/libclangstaticanalyzercheckers/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangstaticanalyzercheckers/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangstaticanalyzercheckers SRCDIR= tools/clang/lib/StaticAnalyzer/Checkers Modified: head/lib/clang/libclangstaticanalyzercore/Makefile ============================================================================== --- head/lib/clang/libclangstaticanalyzercore/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangstaticanalyzercore/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangstaticanalyzercore SRCDIR= tools/clang/lib/StaticAnalyzer/Core Modified: head/lib/clang/libclangstaticanalyzerfrontend/Makefile ============================================================================== --- head/lib/clang/libclangstaticanalyzerfrontend/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libclangstaticanalyzerfrontend/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= clangstaticanalyzerfrontend SRCDIR= tools/clang/lib/StaticAnalyzer/Frontend Modified: head/lib/clang/libllvmarchive/Makefile ============================================================================== --- head/lib/clang/libllvmarchive/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmarchive/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmarchive SRCDIR= lib/Archive Modified: head/lib/clang/libllvmarmasmparser/Makefile ============================================================================== --- head/lib/clang/libllvmarmasmparser/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmarmasmparser/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmarmasmparser SRCDIR= lib/Target/ARM/AsmParser Modified: head/lib/clang/libllvmarmcodegen/Makefile ============================================================================== --- head/lib/clang/libllvmarmcodegen/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmarmcodegen/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmarmcodegen SRCDIR= lib/Target/ARM Modified: head/lib/clang/libllvmarmdesc/Makefile ============================================================================== --- head/lib/clang/libllvmarmdesc/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmarmdesc/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmarmdesc SRCDIR= lib/Target/ARM/MCTargetDesc Modified: head/lib/clang/libllvmarmdisassembler/Makefile ============================================================================== --- head/lib/clang/libllvmarmdisassembler/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmarmdisassembler/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmarmdisassembler SRCDIR= lib/Target/ARM/Disassembler Modified: head/lib/clang/libllvmarminfo/Makefile ============================================================================== --- head/lib/clang/libllvmarminfo/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmarminfo/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmarminfo SRCDIR= lib/Target/ARM/TargetInfo Modified: head/lib/clang/libllvmarminstprinter/Makefile ============================================================================== --- head/lib/clang/libllvmarminstprinter/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmarminstprinter/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmarminstprinter SRCDIR= lib/Target/ARM/InstPrinter Modified: head/lib/clang/libllvmasmparser/Makefile ============================================================================== --- head/lib/clang/libllvmasmparser/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmasmparser/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmasmparser SRCDIR= lib/AsmParser Modified: head/lib/clang/libllvmasmprinter/Makefile ============================================================================== --- head/lib/clang/libllvmasmprinter/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmasmprinter/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmasmprinter SRCDIR= lib/CodeGen/AsmPrinter Modified: head/lib/clang/libllvmbitreader/Makefile ============================================================================== --- head/lib/clang/libllvmbitreader/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmbitreader/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmbitreader SRCDIR= lib/Bitcode/Reader Modified: head/lib/clang/libllvmbitwriter/Makefile ============================================================================== --- head/lib/clang/libllvmbitwriter/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmbitwriter/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmbitwriter SRCDIR= lib/Bitcode/Writer Modified: head/lib/clang/libllvmcodegen/Makefile ============================================================================== --- head/lib/clang/libllvmcodegen/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmcodegen/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmcodegen SRCDIR= lib/CodeGen Modified: head/lib/clang/libllvmcore/Makefile ============================================================================== --- head/lib/clang/libllvmcore/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmcore/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmcore SRCDIR= lib/VMCore Modified: head/lib/clang/libllvmdebuginfo/Makefile ============================================================================== --- head/lib/clang/libllvmdebuginfo/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmdebuginfo/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmdebuginfo SRCDIR= lib/DebugInfo Modified: head/lib/clang/libllvmexecutionengine/Makefile ============================================================================== --- head/lib/clang/libllvmexecutionengine/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmexecutionengine/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmexecutionengine SRCDIR= lib/ExecutionEngine Modified: head/lib/clang/libllvminstcombine/Makefile ============================================================================== --- head/lib/clang/libllvminstcombine/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvminstcombine/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvminstcombine SRCDIR= lib/Transforms/InstCombine Modified: head/lib/clang/libllvminstrumentation/Makefile ============================================================================== --- head/lib/clang/libllvminstrumentation/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvminstrumentation/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvminstrumentation SRCDIR= lib/Transforms/Instrumentation Modified: head/lib/clang/libllvminterpreter/Makefile ============================================================================== --- head/lib/clang/libllvminterpreter/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvminterpreter/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvminterpreter SRCDIR= lib/ExecutionEngine/Interpreter Modified: head/lib/clang/libllvmjit/Makefile ============================================================================== --- head/lib/clang/libllvmjit/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmjit/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmjit SRCDIR= lib/ExecutionEngine/JIT Modified: head/lib/clang/libllvmlinker/Makefile ============================================================================== --- head/lib/clang/libllvmlinker/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmlinker/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmlinker SRCDIR= lib/Linker Modified: head/lib/clang/libllvmmcdisassembler/Makefile ============================================================================== --- head/lib/clang/libllvmmcdisassembler/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmcdisassembler/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmcdisassembler SRCDIR= lib/MC/MCDisassembler Modified: head/lib/clang/libllvmmcparser/Makefile ============================================================================== --- head/lib/clang/libllvmmcparser/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmcparser/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmcparser SRCDIR= lib/MC/MCParser Modified: head/lib/clang/libllvmmipsasmparser/Makefile ============================================================================== --- head/lib/clang/libllvmmipsasmparser/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmipsasmparser/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmipsasmparser SRCDIR= lib/Target/Mips/AsmParser Modified: head/lib/clang/libllvmmipscodegen/Makefile ============================================================================== --- head/lib/clang/libllvmmipscodegen/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmipscodegen/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmipscodegen SRCDIR= lib/Target/Mips Modified: head/lib/clang/libllvmmipsdesc/Makefile ============================================================================== --- head/lib/clang/libllvmmipsdesc/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmipsdesc/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmipsdesc SRCDIR= lib/Target/Mips/MCTargetDesc Modified: head/lib/clang/libllvmmipsdisassembler/Makefile ============================================================================== --- head/lib/clang/libllvmmipsdisassembler/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmipsdisassembler/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmipsdisassembler SRCDIR= lib/Target/Mips/Disassembler Modified: head/lib/clang/libllvmmipsinfo/Makefile ============================================================================== --- head/lib/clang/libllvmmipsinfo/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmipsinfo/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmipsinfo SRCDIR= lib/Target/Mips/TargetInfo Modified: head/lib/clang/libllvmmipsinstprinter/Makefile ============================================================================== --- head/lib/clang/libllvmmipsinstprinter/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmmipsinstprinter/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmmipsinstprinter SRCDIR= lib/Target/Mips/InstPrinter Modified: head/lib/clang/libllvmobject/Makefile ============================================================================== --- head/lib/clang/libllvmobject/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmobject/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmobject SRCDIR= lib/Object Modified: head/lib/clang/libllvmpowerpccodegen/Makefile ============================================================================== --- head/lib/clang/libllvmpowerpccodegen/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmpowerpccodegen/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmpowerpccodegen SRCDIR= lib/Target/PowerPC Modified: head/lib/clang/libllvmpowerpcdesc/Makefile ============================================================================== --- head/lib/clang/libllvmpowerpcdesc/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmpowerpcdesc/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmpowerpcdesc SRCDIR= lib/Target/PowerPC/MCTargetDesc Modified: head/lib/clang/libllvmpowerpcinfo/Makefile ============================================================================== --- head/lib/clang/libllvmpowerpcinfo/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmpowerpcinfo/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmpowerpcinfo SRCDIR= lib/Target/PowerPC/TargetInfo Modified: head/lib/clang/libllvmpowerpcinstprinter/Makefile ============================================================================== --- head/lib/clang/libllvmpowerpcinstprinter/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmpowerpcinstprinter/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmpowerpcinstprinter SRCDIR= lib/Target/PowerPC/InstPrinter Modified: head/lib/clang/libllvmruntimedyld/Makefile ============================================================================== --- head/lib/clang/libllvmruntimedyld/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmruntimedyld/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmruntimedyld SRCDIR= lib/ExecutionEngine/RuntimeDyld Modified: head/lib/clang/libllvmselectiondag/Makefile ============================================================================== --- head/lib/clang/libllvmselectiondag/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmselectiondag/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmselectiondag SRCDIR= lib/CodeGen/SelectionDAG Modified: head/lib/clang/libllvmtablegen/Makefile ============================================================================== --- head/lib/clang/libllvmtablegen/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmtablegen/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmtablegen SRCDIR= lib/TableGen Modified: head/lib/clang/libllvmtarget/Makefile ============================================================================== --- head/lib/clang/libllvmtarget/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmtarget/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmtarget SRCDIR= lib/Target Modified: head/lib/clang/libllvmvectorize/Makefile ============================================================================== --- head/lib/clang/libllvmvectorize/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmvectorize/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmvectorize SRCDIR= lib/Transforms/Vectorize Modified: head/lib/clang/libllvmx86asmparser/Makefile ============================================================================== --- head/lib/clang/libllvmx86asmparser/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmx86asmparser/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmx86asmparser SRCDIR= lib/Target/X86/AsmParser Modified: head/lib/clang/libllvmx86codegen/Makefile ============================================================================== --- head/lib/clang/libllvmx86codegen/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmx86codegen/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmx86codegen SRCDIR= lib/Target/X86 Modified: head/lib/clang/libllvmx86desc/Makefile ============================================================================== --- head/lib/clang/libllvmx86desc/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmx86desc/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmx86desc SRCDIR= lib/Target/X86/MCTargetDesc Modified: head/lib/clang/libllvmx86info/Makefile ============================================================================== --- head/lib/clang/libllvmx86info/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmx86info/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmx86info SRCDIR= lib/Target/X86/TargetInfo Modified: head/lib/clang/libllvmx86instprinter/Makefile ============================================================================== --- head/lib/clang/libllvmx86instprinter/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmx86instprinter/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmx86instprinter SRCDIR= lib/Target/X86/InstPrinter Modified: head/lib/clang/libllvmx86utils/Makefile ============================================================================== --- head/lib/clang/libllvmx86utils/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/lib/clang/libllvmx86utils/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.own.mk> + LIB= llvmx86utils SRCDIR= lib/Target/X86/Utils Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat Feb 2 22:23:45 2013 (r246258) +++ head/share/mk/bsd.own.mk Sat Feb 2 22:28:29 2013 (r246259) @@ -391,9 +391,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 # Clang the default system compiler only on x86. .if ${__T} == "amd64" || ${__T} == "i386" @@ -524,6 +524,7 @@ MK_GDB:= no .if ${MK_CLANG} == "no" MK_CLANG_EXTRAS:= no +MK_CLANG_FULL:= no MK_CLANG_IS_CC:= no .endif Added: head/tools/build/options/WITHOUT_CLANG_FULL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_CLANG_FULL Sat Feb 2 22:28:29 2013 (r246259) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of +the Clang C/C++ compiler. Added: head/tools/build/options/WITH_CLANG_FULL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_CLANG_FULL Sat Feb 2 22:28:29 2013 (r246259) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the +Clang C/C++ compiler. Modified: head/usr.bin/clang/clang/Makefile ============================================================================== --- head/usr.bin/clang/clang/Makefile Sat Feb 2 22:23:45 2013 (r246258) +++ head/usr.bin/clang/clang/Makefile Sat Feb 2 22:28:29 2013 (r246259) @@ -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 \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302022228.r12MSU9p021594>