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
This commit is contained in:
Ed Maste 2016-05-05 21:20:09 +00:00
parent eb98afc8b0
commit c43c22982e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299138

View File

@ -221,13 +221,14 @@ Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td
.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 \