]> git.lizzy.rs Git - rust.git/commitdiff
enable the MSP430 LLVM backend
authorJorge Aparicio <japaricious@gmail.com>
Wed, 9 Nov 2016 19:00:26 +0000 (14:00 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sat, 12 Nov 2016 22:33:35 +0000 (17:33 -0500)
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.

src/librustc_llvm/build.rs
src/librustc_llvm/lib.rs

index 8656bb8bf00360f459f62c26190cc1c531265988..ca80a5269c95a66680002e2e3fece30d79bbe9e3 100644 (file)
@@ -66,7 +66,7 @@ fn main() {
     let is_crossed = target != host;
 
     let optional_components =
-        ["x86", "arm", "aarch64", "mips", "powerpc", "pnacl", "systemz", "jsbackend"];
+        ["x86", "arm", "aarch64", "mips", "powerpc", "pnacl", "systemz", "jsbackend", "msp430"];
 
     // FIXME: surely we don't need all these components, right? Stuff like mcjit
     //        or interpreter the compiler itself never uses.
index 07b87072c435e6ef14d9ebc0322285e6fe3446ca..65e0dbcad3a6a8eb7615a08f53fa498bd5de2c8c 100644 (file)
@@ -413,6 +413,11 @@ fn init() { }
                  LLVMInitializeJSBackendTargetInfo,
                  LLVMInitializeJSBackendTarget,
                  LLVMInitializeJSBackendTargetMC);
+    init_target!(llvm_component = "msp430",
+                 LLVMInitializeMSP430TargetInfo,
+                 LLVMInitializeMSP430Target,
+                 LLVMInitializeMSP430TargetMC,
+                 LLVMInitializeMSP430AsmPrinter);
 }
 
 pub fn last_error() -> Option<String> {