Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2017 23:32:24 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321439 - in head: . lib/clang/libllvm
Message-ID:  <201707242332.v6ONWOdo055285@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Mon Jul 24 23:32:24 2017
New Revision: 321439
URL: https://svnweb.freebsd.org/changeset/base/321439

Log:
  Move llvm Options.inc hack from r321433 for NO_CLEAN to lib/clang/libllvm.
  
  The files are only ever generated to .OBJDIR, not to WORLDTMP (as a
  sysroot) and are only ever included from a compilation.  So using
  a beforebuild target here removes the file before the compilation
  tries to include it.
  
  MFC after:	2 months
  X-MFC-With:	r321369

Modified:
  head/Makefile.inc1
  head/lib/clang/libllvm/Makefile

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Mon Jul 24 22:26:48 2017	(r321438)
+++ head/Makefile.inc1	Mon Jul 24 23:32:24 2017	(r321439)
@@ -813,16 +813,6 @@ _worldtmp: .PHONY
 	    ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/.depend.${f}.*
 .endif
 .endfor
-# 20170724 remove stale lib/clang/libllvm/Options.inc file, of which there are
-# two different versions after r308421, one for llvm-lib, one for llvm-dlltool
-.for d in ${OBJTREE} ${WORLDTMP}
-.for f in ${d}${.CURDIR}/lib/clang/libllvm/Options.inc
-.if exists(${f}) || exists(${f}.d)
-	@echo Removing stale generated ${f} files
-	@rm -f ${f} ${f}.d
-.endif
-.endfor
-.endfor
 .for _dir in \
     lib lib/casper usr legacy/bin legacy/usr
 	mkdir -p ${WORLDTMP}/${_dir}

Modified: head/lib/clang/libllvm/Makefile
==============================================================================
--- head/lib/clang/libllvm/Makefile	Mon Jul 24 22:26:48 2017	(r321438)
+++ head/lib/clang/libllvm/Makefile	Mon Jul 24 23:32:24 2017	(r321439)
@@ -1302,6 +1302,16 @@ llvm-dlltool/Options.inc: ${LLVM_SRCS}/lib/ToolDrivers
 TGHDRS+=	llvm-dlltool/Options.inc
 CFLAGS.DlltoolDriver.cpp+=	-I${.OBJDIR}/llvm-dlltool
 
+beforebuild:
+# 20170724 remove stale Options.inc file, of which there are two different
+# versions after r308421, one for llvm-lib, one for llvm-dlltool
+.for f in Options.inc
+.if exists(${f}) || exists(${f}.d)
+	@echo Removing stale generated ${f} files
+	@rm -f ${f} ${f}.d
+.endif
+.endfor
+
 # Note: some rules are superfluous, not every combination is valid.
 .for arch in \
 	AArch64/AArch64 ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707242332.v6ONWOdo055285>