Remove customizations in #includes of Options.inc, and adjust lld
Makefile to generate the file in the right place.
This commit is contained in:
parent
5a0b6c1b01
commit
4aff0f42d5
@ -56,7 +56,7 @@ class ELFOptTable : public llvm::opt::OptTable {
|
||||
enum {
|
||||
OPT_INVALID = 0,
|
||||
#define OPTION(_1, _2, ID, _4, _5, _6, _7, _8, _9, _10, _11, _12) OPT_##ID,
|
||||
#include "ELF/Options.inc"
|
||||
#include "Options.inc"
|
||||
#undef OPTION
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ using namespace lld::elf;
|
||||
|
||||
// Create prefix string literals used in Options.td
|
||||
#define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
|
||||
#include "ELF/Options.inc"
|
||||
#include "Options.inc"
|
||||
#undef PREFIX
|
||||
|
||||
// Create table mapping all options defined in Options.td
|
||||
@ -46,7 +46,7 @@ static const opt::OptTable::Info OptInfo[] = {
|
||||
#define OPTION(X1, X2, ID, KIND, GROUP, ALIAS, X7, X8, X9, X10, X11, X12) \
|
||||
{X1, X2, X10, X11, OPT_##ID, opt::Option::KIND##Class, \
|
||||
X9, X8, OPT_##GROUP, OPT_##ALIAS, X7, X12},
|
||||
#include "ELF/Options.inc"
|
||||
#include "Options.inc"
|
||||
#undef OPTION
|
||||
};
|
||||
|
||||
|
@ -85,12 +85,13 @@ LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a
|
||||
.endfor
|
||||
|
||||
LLVM_TBLGEN?= llvm-tblgen
|
||||
ELF/Options.inc: ${LLD_SRCS}/ELF/Options.td
|
||||
${LLVM_TBLGEN} -gen-opt-parser-defs \
|
||||
-I ${LLVM_SRCS}/include \
|
||||
-d ${.TARGET:C/$/.d/} -o ${.TARGET} \
|
||||
${LLVM_SRCS}/tools/lld/ELF/Options.td
|
||||
TGHDRS+= ELF/Options.inc
|
||||
INCFILE= Options.inc
|
||||
TDFILE= ${LLD_SRCS}/ELF/Options.td
|
||||
GENOPT= -gen-opt-parser-defs
|
||||
${INCFILE}: ${TDFILE}
|
||||
${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \
|
||||
-o ${.TARGET} ${TDFILE}
|
||||
TGHDRS+= ${INCFILE}
|
||||
|
||||
DPSRCS+= ${TGHDRS}
|
||||
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}
|
||||
|
Loading…
Reference in New Issue
Block a user