[llvm] r192697 - Revert "Add AllTargetsBindings sublibrary" as it breaks cmake build on (atleast) windows and darwin.

Anders Waldenborg anders at 0x63.nu
Tue Oct 15 06:04:27 PDT 2013


Author: andersg
Date: Tue Oct 15 08:04:27 2013
New Revision: 192697

URL: http://llvm.org/viewvc/llvm-project?rev=192697&view=rev
Log:
Revert "Add AllTargetsBindings sublibrary" as it breaks cmake build on (atleast) windows and darwin.


Removed:
    llvm/trunk/lib/Target/AllTargetsBindings/
Modified:
    llvm/trunk/include/llvm-c/Target.h
    llvm/trunk/lib/Target/CMakeLists.txt
    llvm/trunk/lib/Target/LLVMBuild.txt
    llvm/trunk/lib/Target/Makefile

Modified: llvm/trunk/include/llvm-c/Target.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Target.h?rev=192697&r1=192696&r2=192697&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Target.h (original)
+++ llvm/trunk/include/llvm-c/Target.h Tue Oct 15 08:04:27 2013
@@ -71,37 +71,62 @@ typedef struct LLVMStructLayout *LLVMStr
   void LLVMInitialize##TargetName##Disassembler(void);
 #include "llvm/Config/Disassemblers.def"
 #undef LLVM_DISASSEMBLER  /* Explicit undef to make SWIG happier */
-
+  
 /** LLVMInitializeAllTargetInfos - The main program should call this function if
     it wants access to all available targets that LLVM is configured to
     support. */
-void LLVMInitializeAllTargetInfos(void);
+static inline void LLVMInitializeAllTargetInfos(void) {
+#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
+#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
+}
 
 /** LLVMInitializeAllTargets - The main program should call this function if it
     wants to link in all available targets that LLVM is configured to
     support. */
-void LLVMInitializeAllTargets(void);
+static inline void LLVMInitializeAllTargets(void) {
+#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
+#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
+}
 
 /** LLVMInitializeAllTargetMCs - The main program should call this function if
     it wants access to all available target MC that LLVM is configured to
     support. */
-void LLVMInitializeAllTargetMCs(void);
-
+static inline void LLVMInitializeAllTargetMCs(void) {
+#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
+#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
+}
+  
 /** LLVMInitializeAllAsmPrinters - The main program should call this function if
     it wants all asm printers that LLVM is configured to support, to make them
     available via the TargetRegistry. */
-void LLVMInitializeAllAsmPrinters(void);
-
+static inline void LLVMInitializeAllAsmPrinters(void) {
+#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
+#include "llvm/Config/AsmPrinters.def"
+#undef LLVM_ASM_PRINTER  /* Explicit undef to make SWIG happier */
+}
+  
 /** LLVMInitializeAllAsmParsers - The main program should call this function if
     it wants all asm parsers that LLVM is configured to support, to make them
     available via the TargetRegistry. */
-void LLVMInitializeAllAsmParsers(void);
-
+static inline void LLVMInitializeAllAsmParsers(void) {
+#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
+#include "llvm/Config/AsmParsers.def"
+#undef LLVM_ASM_PARSER  /* Explicit undef to make SWIG happier */
+}
+  
 /** LLVMInitializeAllDisassemblers - The main program should call this function
     if it wants all disassemblers that LLVM is configured to support, to make
     them available via the TargetRegistry. */
-void LLVMInitializeAllDisassemblers(void);
-
+static inline void LLVMInitializeAllDisassemblers(void) {
+#define LLVM_DISASSEMBLER(TargetName) \
+  LLVMInitialize##TargetName##Disassembler();
+#include "llvm/Config/Disassemblers.def"
+#undef LLVM_DISASSEMBLER  /* Explicit undef to make SWIG happier */
+}
+  
 /** LLVMInitializeNativeTarget - The main program should call this function to
     initialize the native target corresponding to the host.  This is useful 
     for JIT applications to ensure that the target gets linked in correctly. */

Modified: llvm/trunk/lib/Target/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CMakeLists.txt?rev=192697&r1=192696&r2=192697&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/CMakeLists.txt Tue Oct 15 08:04:27 2013
@@ -14,5 +14,3 @@ foreach(t ${LLVM_TARGETS_TO_BUILD})
   message(STATUS "Targeting ${t}")
   add_subdirectory(${t})
 endforeach()
-
-add_subdirectory("AllTargetsBindings")

Modified: llvm/trunk/lib/Target/LLVMBuild.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/LLVMBuild.txt?rev=192697&r1=192696&r2=192697&view=diff
==============================================================================
--- llvm/trunk/lib/Target/LLVMBuild.txt (original)
+++ llvm/trunk/lib/Target/LLVMBuild.txt Tue Oct 15 08:04:27 2013
@@ -16,7 +16,7 @@
 ;===------------------------------------------------------------------------===;
 
 [common]
-subdirectories = AArch64 ARM CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore AllTargetsBindings
+subdirectories = AArch64 ARM CppBackend Hexagon MSP430 NVPTX Mips PowerPC R600 Sparc SystemZ X86 XCore
 
 ; This is a special group whose required libraries are extended (by llvm-build)
 ; with the best execution engine (the native JIT, if available, or the
@@ -47,3 +47,10 @@ name = Target
 parent = Libraries
 required_libraries = Core MC Support
 
+; This is a special group whose required libraries are extended (by llvm-build)
+; with every built target, which makes it easy for tools to include every
+; target.
+[component_4]
+type = LibraryGroup
+name = all-targets
+parent = Libraries

Modified: llvm/trunk/lib/Target/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Makefile?rev=192697&r1=192696&r2=192697&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Makefile (original)
+++ llvm/trunk/lib/Target/Makefile Tue Oct 15 08:04:27 2013
@@ -15,6 +15,6 @@ BUILD_ARCHIVE = 1
 # value for PARALLEL_DIRS which must be set before Makefile.rules is included
 include $(LEVEL)/Makefile.config
 
-PARALLEL_DIRS := $(TARGETS_TO_BUILD) AllTargetsBindings
+PARALLEL_DIRS := $(TARGETS_TO_BUILD)
 
 include $(LLVM_SRC_ROOT)/Makefile.rules





More information about the llvm-commits mailing list