Skip to content

Commit 4f9f7b0

Browse files
author
Jorge Aparicio
committed
also enable the MSP430 backend in Makefiles
1 parent 30e5667 commit 4f9f7b0

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ do
17821782
CMAKE_ARGS="$CMAKE_ARGS -DLLVM_ENABLE_ASSERTIONS=ON"
17831783
fi
17841784

1785-
CMAKE_ARGS="$CMAKE_ARGS -DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend'"
1785+
CMAKE_ARGS="$CMAKE_ARGS -DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430'"
17861786
CMAKE_ARGS="$CMAKE_ARGS -G '$CFG_CMAKE_GENERATOR'"
17871787
CMAKE_ARGS="$CMAKE_ARGS $CFG_LLVM_SRC_DIR"
17881788

mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ endif
285285
# LLVM macros
286286
######################################################################
287287

288-
LLVM_OPTIONAL_COMPONENTS=x86 arm aarch64 mips powerpc pnacl systemz jsbackend
288+
LLVM_OPTIONAL_COMPONENTS=x86 arm aarch64 mips powerpc pnacl systemz jsbackend msp430
289289
LLVM_REQUIRED_COMPONENTS=ipo bitreader bitwriter linker asmparser mcjit \
290290
interpreter instrumentation
291291

src/rustllvm/PassWrapper.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,20 @@ LLVMRustAddPass(LLVMPassManagerRef PM, LLVMPassRef rust_pass) {
137137
#define SUBTARGET_SYSTEMZ
138138
#endif
139139

140+
#ifdef LLVM_COMPONENT_MSP430
141+
#define SUBTARGET_MSP430 SUBTARGET(MSP430)
142+
#else
143+
#define SUBTARGET_MSP430
144+
#endif
145+
140146
#define GEN_SUBTARGETS \
141147
SUBTARGET_X86 \
142148
SUBTARGET_ARM \
143149
SUBTARGET_AARCH64 \
144150
SUBTARGET_MIPS \
145151
SUBTARGET_PPC \
146-
SUBTARGET_SYSTEMZ
152+
SUBTARGET_SYSTEMZ \
153+
SUBTARGET_MSP430
147154

148155
#define SUBTARGET(x) namespace llvm { \
149156
extern const SubtargetFeatureKV x##FeatureKV[]; \

0 commit comments

Comments
 (0)