From a72207b61f7b8197f1bf446e4352e09925417f6f Mon Sep 17 00:00:00 2001 From: emaste Date: Thu, 5 May 2016 21:20:09 +0000 Subject: 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 --- lib/clang/clang.build.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/clang/clang.build.mk') diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 5a3d169..6bc4cdf 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -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 \ -- cgit v1.1