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
This commit is contained in:
parent
757224cbdb
commit
df5d2454a3
@ -60,6 +60,8 @@ def warn_fe_cc_log_diagnostics_failure : Warning<
|
||||
"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)">,
|
||||
|
@ -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 *CreateFrontendBaseAction(CompilerInstance &CI) {
|
||||
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 *CreateFrontendBaseAction(CompilerInstance &CI) {
|
||||
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 *CreateFrontendAction(CompilerInstance &CI) {
|
||||
|
||||
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 *CreateFrontendAction(CompilerInstance &CI) {
|
||||
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(CompilerInstance *Clang) {
|
||||
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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -8,6 +8,12 @@ CFLAGS+= -I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \
|
||||
-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
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clanganalysis
|
||||
|
||||
SRCDIR= tools/clang/lib/Analysis
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangarcmigrate
|
||||
|
||||
SRCDIR= tools/clang/lib/ARCMigrate
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangast
|
||||
|
||||
SRCDIR= tools/clang/lib/AST
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangbasic
|
||||
|
||||
SRCDIR= tools/clang/lib/Basic
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangcodegen
|
||||
|
||||
SRCDIR= tools/clang/lib/CodeGen
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangdriver
|
||||
|
||||
SRCDIR= tools/clang/lib/Driver
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangedit
|
||||
|
||||
SRCDIR= tools/clang/lib/Edit
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangfrontend
|
||||
|
||||
SRCDIR= tools/clang/lib/Frontend
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangfrontendtool
|
||||
|
||||
SRCDIR= tools/clang/lib/FrontendTool
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clanglex
|
||||
|
||||
SRCDIR= tools/clang/lib/Lex
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangparse
|
||||
|
||||
SRCDIR= tools/clang/lib/Parse
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangrewritecore
|
||||
|
||||
SRCDIR= tools/clang/lib/Rewrite/Core
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangrewritefrontend
|
||||
|
||||
SRCDIR= tools/clang/lib/Rewrite/Frontend
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangsema
|
||||
|
||||
SRCDIR= tools/clang/lib/Sema
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangserialization
|
||||
|
||||
SRCDIR= tools/clang/lib/Serialization
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangstaticanalyzercheckers
|
||||
|
||||
SRCDIR= tools/clang/lib/StaticAnalyzer/Checkers
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangstaticanalyzercore
|
||||
|
||||
SRCDIR= tools/clang/lib/StaticAnalyzer/Core
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= clangstaticanalyzerfrontend
|
||||
|
||||
SRCDIR= tools/clang/lib/StaticAnalyzer/Frontend
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmarchive
|
||||
|
||||
SRCDIR= lib/Archive
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmarmasmparser
|
||||
|
||||
SRCDIR= lib/Target/ARM/AsmParser
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmarmcodegen
|
||||
|
||||
SRCDIR= lib/Target/ARM
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmarmdesc
|
||||
|
||||
SRCDIR= lib/Target/ARM/MCTargetDesc
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmarmdisassembler
|
||||
|
||||
SRCDIR= lib/Target/ARM/Disassembler
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmarminfo
|
||||
|
||||
SRCDIR= lib/Target/ARM/TargetInfo
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmarminstprinter
|
||||
|
||||
SRCDIR= lib/Target/ARM/InstPrinter
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmasmparser
|
||||
|
||||
SRCDIR= lib/AsmParser
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmasmprinter
|
||||
|
||||
SRCDIR= lib/CodeGen/AsmPrinter
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmbitreader
|
||||
|
||||
SRCDIR= lib/Bitcode/Reader
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmbitwriter
|
||||
|
||||
SRCDIR= lib/Bitcode/Writer
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmcodegen
|
||||
|
||||
SRCDIR= lib/CodeGen
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmcore
|
||||
|
||||
SRCDIR= lib/VMCore
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmdebuginfo
|
||||
|
||||
SRCDIR= lib/DebugInfo
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmexecutionengine
|
||||
|
||||
SRCDIR= lib/ExecutionEngine
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvminstcombine
|
||||
|
||||
SRCDIR= lib/Transforms/InstCombine
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvminstrumentation
|
||||
|
||||
SRCDIR= lib/Transforms/Instrumentation
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvminterpreter
|
||||
|
||||
SRCDIR= lib/ExecutionEngine/Interpreter
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmjit
|
||||
|
||||
SRCDIR= lib/ExecutionEngine/JIT
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmlinker
|
||||
|
||||
SRCDIR= lib/Linker
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmcdisassembler
|
||||
|
||||
SRCDIR= lib/MC/MCDisassembler
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmcparser
|
||||
|
||||
SRCDIR= lib/MC/MCParser
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmipsasmparser
|
||||
|
||||
SRCDIR= lib/Target/Mips/AsmParser
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmipscodegen
|
||||
|
||||
SRCDIR= lib/Target/Mips
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmipsdesc
|
||||
|
||||
SRCDIR= lib/Target/Mips/MCTargetDesc
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmipsdisassembler
|
||||
|
||||
SRCDIR= lib/Target/Mips/Disassembler
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmipsinfo
|
||||
|
||||
SRCDIR= lib/Target/Mips/TargetInfo
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmmipsinstprinter
|
||||
|
||||
SRCDIR= lib/Target/Mips/InstPrinter
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmobject
|
||||
|
||||
SRCDIR= lib/Object
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmpowerpccodegen
|
||||
|
||||
SRCDIR= lib/Target/PowerPC
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmpowerpcdesc
|
||||
|
||||
SRCDIR= lib/Target/PowerPC/MCTargetDesc
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmpowerpcinfo
|
||||
|
||||
SRCDIR= lib/Target/PowerPC/TargetInfo
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmpowerpcinstprinter
|
||||
|
||||
SRCDIR= lib/Target/PowerPC/InstPrinter
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmruntimedyld
|
||||
|
||||
SRCDIR= lib/ExecutionEngine/RuntimeDyld
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmselectiondag
|
||||
|
||||
SRCDIR= lib/CodeGen/SelectionDAG
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmtablegen
|
||||
|
||||
SRCDIR= lib/TableGen
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmtarget
|
||||
|
||||
SRCDIR= lib/Target
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmvectorize
|
||||
|
||||
SRCDIR= lib/Transforms/Vectorize
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmx86asmparser
|
||||
|
||||
SRCDIR= lib/Target/X86/AsmParser
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmx86codegen
|
||||
|
||||
SRCDIR= lib/Target/X86
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmx86desc
|
||||
|
||||
SRCDIR= lib/Target/X86/MCTargetDesc
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmx86info
|
||||
|
||||
SRCDIR= lib/Target/X86/TargetInfo
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmx86instprinter
|
||||
|
||||
SRCDIR= lib/Target/X86/InstPrinter
|
||||
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
LIB= llvmx86utils
|
||||
|
||||
SRCDIR= lib/Target/X86/Utils
|
||||
|
@ -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
|
||||
|
||||
|
3
tools/build/options/WITHOUT_CLANG_FULL
Normal file
3
tools/build/options/WITHOUT_CLANG_FULL
Normal file
@ -0,0 +1,3 @@
|
||||
.\" $FreeBSD$
|
||||
Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of
|
||||
the Clang C/C++ compiler.
|
3
tools/build/options/WITH_CLANG_FULL
Normal file
3
tools/build/options/WITH_CLANG_FULL
Normal file
@ -0,0 +1,3 @@
|
||||
.\" $FreeBSD$
|
||||
Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the
|
||||
Clang C/C++ compiler.
|
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user