Skip to content

Commit f5a05ad

Browse files
author
Jorge Aparicio
committed
enable the MSP430 LLVM backend
to let people experiment with this target out of tree. The MSP430 architecture is used in 16-bit microcontrollers commonly used in Digital Signal Processing applications.
1 parent 026add5 commit f5a05ad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/librustc_llvm/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn main() {
6666
let is_crossed = target != host;
6767

6868
let optional_components =
69-
["x86", "arm", "aarch64", "mips", "powerpc", "pnacl", "systemz", "jsbackend"];
69+
["x86", "arm", "aarch64", "mips", "powerpc", "pnacl", "systemz", "jsbackend", "msp430"];
7070

7171
// FIXME: surely we don't need all these components, right? Stuff like mcjit
7272
// or interpreter the compiler itself never uses.

src/librustc_llvm/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ pub fn initialize_available_targets() {
413413
LLVMInitializeJSBackendTargetInfo,
414414
LLVMInitializeJSBackendTarget,
415415
LLVMInitializeJSBackendTargetMC);
416+
init_target!(llvm_component = "msp430",
417+
LLVMInitializeMSP430TargetInfo,
418+
LLVMInitializeMSP430Target,
419+
LLVMInitializeMSP430TargetMC,
420+
LLVMInitializeMSP430AsmPrinter);
416421
}
417422

418423
pub fn last_error() -> Option<String> {

0 commit comments

Comments
 (0)