From owner-svn-src-head@FreeBSD.ORG Wed May 14 17:11:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA3E5854; Wed, 14 May 2014 17:11:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5F7024FA; Wed, 14 May 2014 17:11:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4EHBv4D042725; Wed, 14 May 2014 17:11:57 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4EHBv1v042724; Wed, 14 May 2014 17:11:57 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201405141711.s4EHBv1v042724@svn.freebsd.org> From: Dimitry Andric Date: Wed, 14 May 2014 17:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266053 - head/lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 17:11:57 -0000 Author: dim Date: Wed May 14 17:11:57 2014 New Revision: 266053 URL: http://svnweb.freebsd.org/changeset/base/266053 Log: Use the new -d option that was added to tblgen between llvm/clang 3.3 and 3.4 to generate dependency files for the '.inc.h' files generated from .td files, and .sinclude those dependency files in clang.build.mk. This will make future incremental builds of lib/clang and usr.bin/clang work correctly, whenever any of the .td files get modified. Note that this will not fix any problems with incremental builds from *before* this revision, since there will not yet be any generated dependency files. A quick workaround is to run the following: find /usr/obj -type f -name '*.inc.h' | xargs rm and then a regular incremental buildworld (e.g. with -DNO_CLEAN). MFC after: 3 days Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Wed May 14 17:07:14 2014 (r266052) +++ head/lib/clang/clang.build.mk Wed May 14 17:11:57 2014 (r266053) @@ -43,17 +43,9 @@ CXXFLAGS+= -fno-exceptions -fno-rtti TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen -Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsARM.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsHexagon.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsMips.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsNVVM.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsPowerPC.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsR600.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsX86.td \ - ${LLVM_SRCS}/include/llvm/IR/IntrinsicsXCore.td - ${TBLGEN} -I ${LLVM_SRCS}/include \ - -gen-intrinsic -o ${.TARGET} \ +Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td + ${TBLGEN} -gen-intrinsic \ + -I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td .for arch in \ ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 @@ -72,144 +64,167 @@ Intrinsics.inc.h: ${LLVM_SRCS}/include/l RegisterInfo/-gen-register-info \ SubtargetInfo/-gen-subtarget ${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ - ${hdr:T:C/,/ /g} -o ${.TARGET} \ + ${TBLGEN} ${hdr:T:C/,/ /g} \ + -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td . endfor .endfor Attrs.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-classes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-classes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrDump.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-dump -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-dump \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrIdentifierArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-identifier-arg-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-identifier-arg-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-impl -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrLateParsed.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-late-parsed-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-late-parsed-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrImpl.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-impl -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrKinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-kinds -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrParsedAttrList.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-parsed-attr-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrPCHRead.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-pch-read -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrPCHWrite.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-pch-write -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-write \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrSpellings.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-spelling-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-spelling-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrSpellingListIndex.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-spelling-index -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrTemplateInstantiate.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-template-instantiate -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} AttrTypeArg.inc.h: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-attr-type-arg-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-type-arg-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + ${.ALLSRC} CommentCommandInfo.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-command-info -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-command-info \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentCommandList.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-command-list -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-command-list \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLNamedCharacterReferences.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-named-character-references -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLTags.inc.h: ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-tags -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-tags \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentHTMLTagsProperties.inc.h: \ ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-html-tags-properties -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CommentNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-comment-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} DeclNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-decl-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-decl-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} StmtNodes.inc.h: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td - ${CLANG_TBLGEN} \ - -gen-clang-stmt-nodes -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-stmt-nodes \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} arm_neon.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td - ${CLANG_TBLGEN} \ - -gen-arm-neon -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} arm_neon.inc.h: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td - ${CLANG_TBLGEN} \ - -gen-arm-neon-sema -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon-sema \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diag-groups -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diag-groups \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} DiagnosticIndexName.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diags-index-name -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diags-index-name \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} .for hdr in AST Analysis Comment Common Driver Frontend Lex Parse Sema Serialization Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include/clang/Basic \ - -gen-clang-diags-defs -clang-component=${hdr} -o ${.TARGET} \ - ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/\.h$/.d/} \ + -o ${.TARGET} ${.ALLSRC} .endfor Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC} + ${TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} CC1AsOptions.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1AsOptions.td - ${TBLGEN} -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -gen-opt-parser-defs -o ${.TARGET} ${.ALLSRC} + ${TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ + -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} ${.ALLSRC} Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td \ ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/CheckerBase.td - ${CLANG_TBLGEN} -I ${CLANG_SRCS}/include \ - -gen-clang-sa-checkers -o ${.TARGET} \ + ${CLANG_TBLGEN} -gen-clang-sa-checkers \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td +.for dep in ${TGHDRS:C/$/.inc.d/} +. sinclude "${dep}" +.endfor + SRCS+= ${TGHDRS:C/$/.inc.h/} DPADD+= ${TGHDRS:C/$/.inc.h/} -CLEANFILES+= ${TGHDRS:C/$/.inc.h/} +CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/}