llvm.org GIT mirror llvm / fa3f0b9
Add CMake and configure logic to create llvm/Config/Disassemblers.defs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89839 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 10 years ago
3 changed file(s) with 49 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
279279
280280 set(LLVM_ENUM_ASM_PRINTERS "")
281281 set(LLVM_ENUM_ASM_PARSERS "")
282 set(LLVM_ENUM_DISASSEMBLERS "")
282283 foreach(t ${LLVM_TARGETS_TO_BUILD})
283284 message(STATUS "Targeting ${t}")
284285 add_subdirectory(lib/Target/${t})
293294 set(LLVM_ENUM_ASM_PARSERS
294295 "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
295296 endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmParser/CMakeLists.txt )
297 if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/Disassembler/CMakeLists.txt )
298 add_subdirectory(lib/Target/${t}/Disassembler)
299 set(LLVM_ENUM_DISASSEMBLERS
300 "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n")
301 endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/Disassembler/CMakeLists.txt )
296302 set(CURRENT_LLVM_TARGET)
297303 endforeach(t)
298304
306312 configure_file(
307313 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in
308314 ${LLVM_BINARY_DIR}/include/llvm/Config/AsmParsers.def
315 )
316
317 # Produce llvm/Config/Disassemblers.def
318 configure_file(
319 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in
320 ${LLVM_BINARY_DIR}/include/llvm/Config/Disassemblers.def
309321 )
310322
311323 add_subdirectory(lib/ExecutionEngine)
532532 fi
533533 done
534534
535 # Build the LLVM_TARGET and LLVM_ASM_PRINTER macro uses for
536 # Targets.def, AsmPrinters.def, and AsmParsers.def.
535 # Build the LLVM_TARGET and LLVM_... macros for Targets.def and the individual
536 # target feature def files.
537537 LLVM_ENUM_TARGETS=""
538538 LLVM_ENUM_ASM_PRINTERS=""
539539 LLVM_ENUM_ASM_PARSERS=""
540 LLVM_ENUM_DISASSEMBLERS=""
540541 for target_to_build in $TARGETS_TO_BUILD; do
541542 LLVM_ENUM_TARGETS="LLVM_TARGET($target_to_build) $LLVM_ENUM_TARGETS"
542543 if test -f ${srcdir}/lib/Target/${target_to_build}/AsmPrinter/Makefile ; then
545546 if test -f ${srcdir}/lib/Target/${target_to_build}/AsmParser/Makefile ; then
546547 LLVM_ENUM_ASM_PARSERS="LLVM_ASM_PARSER($target_to_build) $LLVM_ENUM_ASM_PARSERS";
547548 fi
549 if test -f ${srcdir}/lib/Target/${target_to_build}/Disassembler/Makefile ; then
550 LLVM_ENUM_DISASSEMBLERS="LLVM_DISASSEMBLER($target_to_build) $LLVM_ENUM_DISASSEMBLERS";
551 fi
548552 done
549553 AC_SUBST(LLVM_ENUM_TARGETS)
550554 AC_SUBST(LLVM_ENUM_ASM_PRINTERS)
551555 AC_SUBST(LLVM_ENUM_ASM_PARSERS)
556 AC_SUBST(LLVM_ENUM_DISASSEMBLERS)
552557
553558 dnl Prevent the CBackend from using printf("%a") for floating point so older
554559 dnl C compilers that cannot deal with the 0x0p+0 hex floating point format
14061411 AC_CONFIG_FILES([include/llvm/Config/Targets.def])
14071412 AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def])
14081413 AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def])
1414 AC_CONFIG_FILES([include/llvm/Config/Disassemblers.def])
14091415 AC_CONFIG_HEADERS([include/llvm/System/DataTypes.h])
14101416
14111417 dnl Configure the makefile's configuration data
0 //===- llvm/Config/Disassemblers.def - LLVM Assembly Parsers ----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file enumerates all of the assembly-language parsers
10 // supported by this build of LLVM. Clients of this file should define
11 // the LLVM_ASM_PARSER macro to be a function-like macro with a
12 // single parameter (the name of the target whose assembly can be
13 // generated); including this file will then enumerate all of the
14 // targets with assembly parsers.
15 //
16 // The set of targets supported by LLVM is generated at configuration
17 // time, at which point this header is generated. Do not modify this
18 // header directly.
19 //
20 //===----------------------------------------------------------------------===//
21
22 #ifndef LLVM_DISASSEMBLER
23 # error Please define the macro LLVM_DISASSEMBLER(TargetName)
24 #endif
25
26 @LLVM_ENUM_DISASSEMBLERS@
27
28 #undef LLVM_DISASSEMBLER