svn commit: r299138 - head/lib/clang
Ed Maste
emaste at FreeBSD.org
Thu May 5 21:20:10 UTC 2016
Author: emaste
Date: Thu May 5 21:20:09 2016
New Revision: 299138
URL: https://svnweb.freebsd.org/changeset/base/299138
Log:
Limit Options.inc generation to desired targets
As mentioned in the Makefile there's an "atrocious" hack to generate a
different version of Options.inc.h, depending on the library being
built.
Remove the catch-all else case and limit it to specific libraries, so
that we don't accidentally use the Options.inc.h from clangdriver if a
future libary also uses Options.inc.h.
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6209
Modified:
head/lib/clang/clang.build.mk
Modified: head/lib/clang/clang.build.mk
==============================================================================
--- head/lib/clang/clang.build.mk Thu May 5 20:16:58 2016 (r299137)
+++ head/lib/clang/clang.build.mk Thu May 5 21:20:09 2016 (r299138)
@@ -221,13 +221,14 @@ Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRC
.endfor
# XXX: Atrocious hack, need to clean this up later
-.if defined(LIB) && ${LIB} == "llvmlibdriver"
+.if ${LIB:U} == llvmlibdriver
Options.inc.h: ${LLVM_SRCS}/lib/LibDriver/Options.td
${LLVM_TBLGEN} -gen-opt-parser-defs \
-I ${LLVM_SRCS}/include \
-d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${LLVM_SRCS}/lib/LibDriver/Options.td
-.else
+.elif ${LIB:U} == clangdriver || ${LIB:U} == clangfrontend || \
+ ${LIB:U} == clangfrontendtool || ${PROG_CXX:U} == clang
Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td
${LLVM_TBLGEN} -gen-opt-parser-defs \
-I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \
More information about the svn-src-head
mailing list