svn commit: r208619 - in projects/clangbsd: lib/clang lib/clang/include/clang/AST lib/clang/include/clang/Driver lib/clang/libclanganalysis lib/clang/libclangast lib/clang/libclangchecker lib/clang...

Roman Divacky rdivacky at FreeBSD.org
Fri May 28 15:42:40 UTC 2010


Author: rdivacky
Date: Fri May 28 15:42:39 2010
New Revision: 208619
URL: http://svn.freebsd.org/changeset/base/208619

Log:
  Update the build infrastructure for the new llvm/clang.
  This reintroduces REQUIRES_RTTI and introduces
  REQUIRES_EH. Thus most of the libs build with -fno-rtti
  and -fno-exceptions.

Added:
  projects/clangbsd/lib/clang/include/clang/AST/
  projects/clangbsd/lib/clang/include/clang/AST/StmtNodes.inc   (contents, props changed)
  projects/clangbsd/lib/clang/include/clang/Driver/CC1AsOptions.inc   (contents, props changed)
Modified:
  projects/clangbsd/lib/clang/clang.build.mk
  projects/clangbsd/lib/clang/libclanganalysis/Makefile
  projects/clangbsd/lib/clang/libclangast/Makefile
  projects/clangbsd/lib/clang/libclangchecker/Makefile
  projects/clangbsd/lib/clang/libclangcodegen/Makefile
  projects/clangbsd/lib/clang/libclangdriver/Makefile
  projects/clangbsd/lib/clang/libclangfrontend/Makefile
  projects/clangbsd/lib/clang/libclangrewrite/Makefile
  projects/clangbsd/lib/clang/libclangsema/Makefile
  projects/clangbsd/lib/clang/libllvmanalysis/Makefile
  projects/clangbsd/lib/clang/libllvmcore/Makefile
  projects/clangbsd/lib/clang/libllvmmc/Makefile
  projects/clangbsd/lib/clang/libllvmscalaropts/Makefile
  projects/clangbsd/lib/clang/libllvmsupport/Makefile
  projects/clangbsd/lib/clang/libllvmsystem/Makefile
  projects/clangbsd/usr.bin/clang/clang/Makefile
  projects/clangbsd/usr.bin/clang/tblgen/Makefile

Modified: projects/clangbsd/lib/clang/clang.build.mk
==============================================================================
--- projects/clangbsd/lib/clang/clang.build.mk	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/clang.build.mk	Fri May 28 15:42:39 2010	(r208619)
@@ -8,6 +8,18 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG
 	-DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \
 	-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG
 
+.ifndef REQUIRES_EH
+CFLAGS+=	-fno-exceptions
+.else
+# If the library or program requires EH, it also requires RTTI.
+CFLAGS+=-fexceptions
+REQUIRES_RTTI=
+.endif
+
+.ifndef REQUIRES_RTTI
+CFLAGS+=	-fno-rtti
+.endif
+
 TARGET_ARCH?=	${MACHINE_ARCH}
 # XXX: 8.0, to keep __FreeBSD_cc_version happy
 CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\"
@@ -60,6 +72,16 @@ CC1Options.inc.h: ${CLANG_SRCS}/include/
 	   -gen-opt-parser-defs \
 	   ${CLANG_SRCS}/include/clang/Driver/CC1Options.td > ${.TARGET}
 
+CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td
+	${TBLGEN} -I${CLANG_SRCS}/include/clang/Driver \
+	   -gen-opt-parser-defs \
+	   ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td > ${.TARGET}
+
+StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/AST/StmtNodes.td
+	${TBLGEN} -I${CLANG_SRCS}/include/clang/AST \
+	   -gen-clang-stmt-nodes \
+	   ${CLANG_SRCS}/include/clang/AST/StmtNodes.td > ${.TARGET}
+
 SRCS+=		${TGHDRS:C/$/.inc.h/}
 DPADD+=		${TGHDRS:C/$/.inc.h/}
 CLEANFILES+=	${TGHDRS:C/$/.inc.h/}

Added: projects/clangbsd/lib/clang/include/clang/AST/StmtNodes.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/clangbsd/lib/clang/include/clang/AST/StmtNodes.inc	Fri May 28 15:42:39 2010	(r208619)
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include "StmtNodes.inc.h"

Added: projects/clangbsd/lib/clang/include/clang/Driver/CC1AsOptions.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/clangbsd/lib/clang/include/clang/Driver/CC1AsOptions.inc	Fri May 28 15:42:39 2010	(r208619)
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+#include "CC1AsOptions.inc.h"

Modified: projects/clangbsd/lib/clang/libclanganalysis/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclanganalysis/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclanganalysis/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -7,6 +7,6 @@ SRCS=	AnalysisContext.cpp CFG.cpp LiveVa
 	PrintfFormatString.cpp ReachableCode.cpp \
 	UninitializedValues.cpp
 
-TGHDRS=	DiagnosticAnalysisKinds DiagnosticCommonKinds
+TGHDRS=	DiagnosticAnalysisKinds DiagnosticCommonKinds StmtNodes
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libclangast/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclangast/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclangast/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -14,6 +14,6 @@ SRCS=	APValue.cpp ASTConsumer.cpp ASTCon
 	StmtProfile.cpp StmtViz.cpp TemplateBase.cpp TemplateName.cpp \
 	Type.cpp TypeLoc.cpp TypePrinter.cpp
 
-TGHDRS=	DiagnosticASTKinds DiagnosticCommonKinds
+TGHDRS=	DiagnosticASTKinds DiagnosticCommonKinds StmtNodes
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libclangchecker/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclangchecker/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclangchecker/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -9,7 +9,7 @@ SRCS=	AdjustedReturnValueChecker.cpp Agg
 	BasicStore.cpp BasicValueFactory.cpp BugReporter.cpp \
 	BugReporterVisitors.cpp BuiltinFunctionChecker.cpp \
 	CFRefCount.cpp CallAndMessageChecker.cpp CallInliner.cpp \
-	CastToStructChecker.cpp CheckDeadStores.cpp \
+	CastSizeChecker.cpp CastToStructChecker.cpp CheckDeadStores.cpp \
 	CheckObjCDealloc.cpp CheckObjCInstMethSignature.cpp \
 	CheckSecuritySyntaxOnly.cpp CheckSizeofPointer.cpp Checker.cpp \
 	CocoaConventions.cpp DereferenceChecker.cpp DivZeroChecker.cpp \
@@ -33,6 +33,6 @@ SRCS=	AdjustedReturnValueChecker.cpp Agg
 	UndefinedAssignmentChecker.cpp UnixAPIChecker.cpp \
 	VLASizeChecker.cpp ValueManager.cpp
 
-TGHDRS=	DiagnosticAnalysisKinds DiagnosticCommonKinds
+TGHDRS=	DiagnosticAnalysisKinds DiagnosticCommonKinds StmtNodes
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libclangcodegen/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclangcodegen/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclangcodegen/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -9,9 +9,9 @@ SRCS=	CGBlocks.cpp CGBuiltin.cpp CGCXX.c
 	CGExprConstant.cpp CGExprScalar.cpp CGObjC.cpp CGObjCGNU.cpp \
 	CGObjCMac.cpp CGRTTI.cpp CGRecordLayoutBuilder.cpp CGStmt.cpp \
 	CGTemporaries.cpp CGVTT.cpp CGVTables.cpp CodeGenFunction.cpp \
-	CodeGenModule.cpp CodeGenTypes.cpp Mangle.cpp \
+	CodeGenModule.cpp CodeGenTypes.cpp ItaniumCXXABI.cpp Mangle.cpp \
 	ModuleBuilder.cpp TargetInfo.cpp
 
-TGHDRS=	DiagnosticCommonKinds Intrinsics
+TGHDRS=	DiagnosticCommonKinds Intrinsics StmtNodes
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libclangdriver/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclangdriver/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclangdriver/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -3,11 +3,12 @@
 LIB=	clangdriver
 
 SRCDIR=	tools/clang/lib/Driver
-SRCS=	Action.cpp Arg.cpp ArgList.cpp CC1Options.cpp Compilation.cpp \
-	Driver.cpp DriverOptions.cpp HostInfo.cpp Job.cpp OptTable.cpp \
-	Option.cpp Phases.cpp Tool.cpp ToolChain.cpp ToolChains.cpp \
-	Tools.cpp Types.cpp
+SRCS=	Action.cpp Arg.cpp ArgList.cpp CC1AsOptions.cpp CC1Options.cpp \
+	Compilation.cpp Driver.cpp DriverOptions.cpp HostInfo.cpp Job.cpp \
+	OptTable.cpp Option.cpp Phases.cpp Tool.cpp ToolChain.cpp \
+	ToolChains.cpp Tools.cpp Types.cpp
 
-TGHDRS=	DiagnosticCommonKinds DiagnosticDriverKinds Options CC1Options
+TGHDRS=	DiagnosticCommonKinds DiagnosticDriverKinds Options CC1Options \
+	CC1AsOptions
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libclangfrontend/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclangfrontend/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclangfrontend/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -4,9 +4,9 @@ LIB=	clangfrontend
 
 SRCDIR=	tools/clang/lib/Frontend
 SRCS=	ASTConsumers.cpp ASTMerge.cpp ASTUnit.cpp AnalysisConsumer.cpp \
-	CacheTokens.cpp CodeGenAction.cpp CompilerInstance.cpp \
-	CompilerInvocation.cpp DeclXML.cpp DependencyFile.cpp \
-	DiagChecker.cpp DocumentXML.cpp FixItRewriter.cpp \
+	BoostConAction.cpp CacheTokens.cpp CodeGenAction.cpp \
+	CompilerInstance.cpp CompilerInvocation.cpp DeclXML.cpp \
+	DependencyFile.cpp DiagChecker.cpp DocumentXML.cpp FixItRewriter.cpp \
 	FrontendAction.cpp FrontendActions.cpp FrontendOptions.cpp \
 	GeneratePCH.cpp HTMLDiagnostics.cpp HTMLPrint.cpp \
 	InitHeaderSearch.cpp InitPreprocessor.cpp LangStandards.cpp \
@@ -20,6 +20,6 @@ SRCS=	ASTConsumers.cpp ASTMerge.cpp ASTU
 
 TGHDRS=	DiagnosticASTKinds DiagnosticCommonKinds DiagnosticDriverKinds \
 	DiagnosticFrontendKinds DiagnosticLexKinds DiagnosticSemaKinds \
-	CC1Options
+	CC1Options StmtNodes
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libclangrewrite/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclangrewrite/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclangrewrite/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -6,6 +6,6 @@ SRCDIR=	tools/clang/lib/Rewrite
 SRCS=	DeltaTree.cpp HTMLRewrite.cpp RewriteRope.cpp Rewriter.cpp \
 	TokenRewriter.cpp
 
-TGHDRS=	DiagnosticCommonKinds
+TGHDRS=	DiagnosticCommonKinds StmtNodes
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libclangsema/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libclangsema/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libclangsema/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -18,6 +18,6 @@ SRCS=	AnalysisBasedWarnings.cpp CodeComp
 	TargetAttributesSema.cpp
 
 TGHDRS=	DiagnosticASTKinds DiagnosticCommonKinds DiagnosticParseKinds \
-	DiagnosticSemaKinds
+	DiagnosticSemaKinds StmtNodes
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libllvmanalysis/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libllvmanalysis/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libllvmanalysis/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -13,12 +13,13 @@ SRCS=	AliasAnalysis.cpp AliasAnalysisCou
 	LibCallAliasAnalysis.cpp LibCallSemantics.cpp Lint.cpp \
 	LiveValues.cpp LoopDependenceAnalysis.cpp LoopInfo.cpp \
 	LoopPass.cpp MemoryBuiltins.cpp MemoryDependenceAnalysis.cpp \
-	PHITransAddr.cpp PointerTracking.cpp PostDominators.cpp \
-	ProfileEstimatorPass.cpp ProfileInfo.cpp ProfileInfoLoader.cpp \
-	ProfileInfoLoaderPass.cpp ProfileVerifierPass.cpp \
-	ScalarEvolution.cpp ScalarEvolutionAliasAnalysis.cpp \
-	ScalarEvolutionExpander.cpp ScalarEvolutionNormalization.cpp \
-	SparsePropagation.cpp Trace.cpp ValueTracking.cpp
+	ModuleDebugInfoPrinter.cpp PHITransAddr.cpp PointerTracking.cpp \
+	PostDominators.cpp ProfileEstimatorPass.cpp ProfileInfo.cpp \
+	ProfileInfoLoader.cpp ProfileInfoLoaderPass.cpp \
+	ProfileVerifierPass.cpp ScalarEvolution.cpp \
+	ScalarEvolutionAliasAnalysis.cpp ScalarEvolutionExpander.cpp \
+	ScalarEvolutionNormalization.cpp SparsePropagation.cpp \
+	Trace.cpp ValueTracking.cpp
 
 TGHDRS=	Intrinsics
 

Modified: projects/clangbsd/lib/clang/libllvmcore/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libllvmcore/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libllvmcore/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -12,6 +12,7 @@ SRCS=	AsmWriter.cpp Attributes.cpp AutoU
 	PassManager.cpp PrintModulePass.cpp Type.cpp \
 	TypeSymbolTable.cpp Use.cpp Value.cpp ValueSymbolTable.cpp \
 	ValueTypes.cpp Verifier.cpp
+REQUIRES_RTTI=
 
 TGHDRS=	Intrinsics
 

Modified: projects/clangbsd/lib/clang/libllvmmc/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libllvmmc/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libllvmmc/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -6,7 +6,8 @@ SRCDIR=	lib/MC
 SRCS=	MCAsmInfo.cpp MCAsmInfoCOFF.cpp MCAsmInfoDarwin.cpp \
 	MCAsmStreamer.cpp MCAssembler.cpp MCCodeEmitter.cpp \
 	MCContext.cpp MCDisassembler.cpp MCExpr.cpp MCInst.cpp \
-	MCInstPrinter.cpp MCMachOStreamer.cpp MCNullStreamer.cpp \
+	MCInstPrinter.cpp MCLabel.cpp MCLoggingStreamer.cpp \
+	MCSectionCOFF.cpp MCMachOStreamer.cpp MCNullStreamer.cpp \
 	MCObjectWriter.cpp MCSection.cpp MCSectionELF.cpp \
 	MCSectionMachO.cpp MCStreamer.cpp MCSymbol.cpp MCValue.cpp \
 	MachObjectWriter.cpp TargetAsmBackend.cpp

Modified: projects/clangbsd/lib/clang/libllvmscalaropts/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libllvmscalaropts/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libllvmscalaropts/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -9,7 +9,7 @@ SRCS=	ADCE.cpp BasicBlockPlacement.cpp C
 	LICM.cpp LoopDeletion.cpp LoopIndexSplit.cpp LoopRotation.cpp \
 	LoopStrengthReduce.cpp LoopUnrollPass.cpp LoopUnswitch.cpp \
 	MemCpyOptimizer.cpp Reassociate.cpp Reg2Mem.cpp SCCP.cpp \
-	Scalar.cpp ScalarReplAggregates.cpp SimplifyCFGPass.cpp \
+	Scalar.cpp ScalarReplAggregates.cpp SimplifyCFGPass.cpp Sink.cpp \
 	SimplifyHalfPowrLibCalls.cpp SimplifyLibCalls.cpp \
 	TailDuplication.cpp TailRecursionElimination.cpp
 

Modified: projects/clangbsd/lib/clang/libllvmsupport/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libllvmsupport/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libllvmsupport/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -15,5 +15,6 @@ SRCS=	APFloat.cpp APInt.cpp APSInt.cpp A
 	TargetRegistry.cpp Timer.cpp Triple.cpp Twine.cpp \
 	circular_raw_ostream.cpp raw_os_ostream.cpp raw_ostream.cpp \
 	regcomp.c regerror.c regexec.c regfree.c regstrlcpy.c
+REQUIRES_RTTI=yo
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/lib/clang/libllvmsystem/Makefile
==============================================================================
--- projects/clangbsd/lib/clang/libllvmsystem/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/lib/clang/libllvmsystem/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -8,5 +8,6 @@ SRCS=	Alarm.cpp Atomic.cpp Disassembler.
 	Path.cpp Process.cpp Program.cpp RWMutex.cpp \
 	SearchForAddressOfSpecialSymbol.cpp Signals.cpp \
 	ThreadLocal.cpp Threading.cpp TimeValue.cpp Valgrind.cpp
+REQUIRES_RTTI=
 
 .include "../clang.lib.mk"

Modified: projects/clangbsd/usr.bin/clang/clang/Makefile
==============================================================================
--- projects/clangbsd/usr.bin/clang/clang/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/usr.bin/clang/clang/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -5,14 +5,14 @@
 PROG_CXX=clang
 
 SRCDIR=	tools/clang/tools/driver
-SRCS=	cc1_main.cpp driver.cpp
+SRCS=	cc1_main.cpp cc1as_main.cpp driver.cpp
 MAN=
 
 LINKS=	${BINDIR}/clang ${BINDIR}/clang++
 
 TGHDRS=	DiagnosticCommonKinds DiagnosticDriverKinds \
 	DiagnosticFrontendKinds DiagnosticLexKinds DiagnosticSemaKinds \
-	CC1Options
+	CC1Options CC1AsOptions Options
 LIBDEPS=clangfrontend clangdriver clangcodegen clangsema clangchecker \
 	clanganalysis clangrewrite clangast clangparse clanglex clangbasic \
 	\

Modified: projects/clangbsd/usr.bin/clang/tblgen/Makefile
==============================================================================
--- projects/clangbsd/usr.bin/clang/tblgen/Makefile	Fri May 28 15:40:19 2010	(r208618)
+++ projects/clangbsd/usr.bin/clang/tblgen/Makefile	Fri May 28 15:42:39 2010	(r208619)
@@ -5,8 +5,8 @@ PROG_CXX=tblgen
 SRCDIR=	utils/TableGen
 SRCS=	ARMDecoderEmitter.cpp AsmMatcherEmitter.cpp \
 	AsmWriterEmitter.cpp AsmWriterInst.cpp CallingConvEmitter.cpp \
-	ClangDiagnosticsEmitter.cpp CodeEmitterGen.cpp \
-	CodeGenDAGPatterns.cpp CodeGenInstruction.cpp \
+	ClangASTNodesEmitter.cpp ClangDiagnosticsEmitter.cpp \
+	CodeEmitterGen.cpp CodeGenDAGPatterns.cpp CodeGenInstruction.cpp \
 	CodeGenTarget.cpp DAGISelEmitter.cpp DAGISelMatcher.cpp \
 	DAGISelMatcherEmitter.cpp DAGISelMatcherGen.cpp \
 	DAGISelMatcherOpt.cpp DisassemblerEmitter.cpp EDEmitter.cpp \
@@ -17,6 +17,7 @@ SRCS=	ARMDecoderEmitter.cpp AsmMatcherEm
 	TableGen.cpp TableGenBackend.cpp X86DisassemblerTables.cpp \
 	X86RecognizableInstr.cpp
 MAN=
+REQUIRES_EH=
 
 LIBDEPS=llvmsupport llvmsystem
 


More information about the svn-src-projects mailing list