]> git.lizzy.rs Git - rust.git/commitdiff
build llvm with systemz backend enabled, and link to related libraries
authorJorge Aparicio <japaricious@gmail.com>
Sun, 28 Aug 2016 18:18:28 +0000 (13:18 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sun, 28 Aug 2016 18:18:28 +0000 (13:18 -0500)
when building rust against system llvm

closes #36077

configure
mk/main.mk
src/rustllvm/PassWrapper.cpp

index a48ff6a76109c37a618dbd9179181f87737cfa15..44fb3d368d2c77b3e70be7bacd417a850556c58d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1747,7 +1747,7 @@ do
         CMAKE_ARGS="$CMAKE_ARGS -DLLVM_ENABLE_ASSERTIONS=ON"
     fi
 
-    CMAKE_ARGS="$CMAKE_ARGS -DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;Mips;PowerPC'"
+    CMAKE_ARGS="$CMAKE_ARGS -DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;Mips;PowerPC;SystemZ'"
     CMAKE_ARGS="$CMAKE_ARGS -G '$CFG_CMAKE_GENERATOR'"
     CMAKE_ARGS="$CMAKE_ARGS $CFG_LLVM_SRC_DIR"
 
index 428d9d16182abd52df65e641c7866b35ad371579..5a849af9856f1dd348259cfb0338532133ce31f9 100644 (file)
@@ -300,7 +300,7 @@ endif
 # LLVM macros
 ######################################################################
 
-LLVM_OPTIONAL_COMPONENTS=x86 arm aarch64 mips powerpc pnacl
+LLVM_OPTIONAL_COMPONENTS=x86 arm aarch64 mips powerpc pnacl systemz
 LLVM_REQUIRED_COMPONENTS=ipo bitreader bitwriter linker asmparser mcjit \
                 interpreter instrumentation
 
index 0555a96ff24ce900d6b6f53f56021a6c02496a91..a271987210b673411e77c959379f55d6b49b40a3 100644 (file)
@@ -131,12 +131,19 @@ LLVMRustAddPass(LLVMPassManagerRef PM, LLVMPassRef rust_pass) {
 #define SUBTARGET_PPC
 #endif
 
+#ifdef LLVM_COMPONENT_SYSTEMZ
+#define SUBTARGET_SYSTEMZ SUBTARGET(SystemZ)
+#else
+#define SUBTARGET_SYSTEMZ
+#endif
+
 #define GEN_SUBTARGETS    \
         SUBTARGET_X86     \
         SUBTARGET_ARM     \
         SUBTARGET_AARCH64 \
         SUBTARGET_MIPS    \
-        SUBTARGET_PPC
+        SUBTARGET_PPC     \
+        SUBTARGET_SYSTEMZ
 
 #define SUBTARGET(x) namespace llvm {                \
     extern const SubtargetFeatureKV x##FeatureKV[];  \