about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2015-01-09 20:00:29 -0800
committerRicho Healey <richo@psych0tik.net>2015-01-11 21:14:30 -0800
commitc8442afeb066656c4f4db3ca8538ee5976b504f6 (patch)
treec73ee58b9dd5b8cf1bd86994a37e2c9f5c200ce9 /src
parente5bbe8244b8e8efefa26df4287f22fa3f059bd1c (diff)
powerpc: Add backend support for powerpc
Diffstat (limited to 'src')
-rw-r--r--src/libcoretest/mem.rs6
-rw-r--r--src/librustc_back/target/mod.rs4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/libcoretest/mem.rs b/src/libcoretest/mem.rs
index 96b50e8bccb..39af76ff87b 100644
--- a/src/libcoretest/mem.rs
+++ b/src/libcoretest/mem.rs
@@ -22,7 +22,8 @@ fn size_of_basic() {
 #[cfg(any(target_arch = "x86",
           target_arch = "arm",
           target_arch = "mips",
-          target_arch = "mipsel"))]
+          target_arch = "mipsel",
+          target_arch = "powerpc"))]
 fn size_of_32() {
     assert_eq!(size_of::<uint>(), 4u);
     assert_eq!(size_of::<*const uint>(), 4u);
@@ -55,7 +56,8 @@ fn align_of_basic() {
 #[cfg(any(target_arch = "x86",
           target_arch = "arm",
           target_arch = "mips",
-          target_arch = "mipsel"))]
+          target_arch = "mipsel",
+          target_arch = "powerpc"))]
 fn align_of_32() {
     assert_eq!(align_of::<uint>(), 4u);
     assert_eq!(align_of::<*const uint>(), 4u);
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
index 57e2744ae9b..f8eabb4375f 100644
--- a/src/librustc_back/target/mod.rs
+++ b/src/librustc_back/target/mod.rs
@@ -72,6 +72,7 @@ mod i686_unknown_dragonfly;
 mod i686_unknown_linux_gnu;
 mod mips_unknown_linux_gnu;
 mod mipsel_unknown_linux_gnu;
+mod powerpc_unknown_linux_gnu;
 mod x86_64_apple_darwin;
 mod x86_64_apple_ios;
 mod x86_64_pc_windows_gnu;
@@ -95,7 +96,7 @@ pub struct Target {
     /// OS name to use for conditional compilation.
     pub target_os: String,
     /// Architecture to use for ABI considerations. Valid options: "x86", "x86_64", "arm",
-    /// "aarch64", and "mips". "mips" includes "mipsel".
+    /// "aarch64", "mips", and "powerpc". "mips" includes "mipsel".
     pub arch: String,
     /// Optional settings with defaults.
     pub options: TargetOptions,
@@ -339,6 +340,7 @@ impl Target {
             i686_unknown_linux_gnu,
             mips_unknown_linux_gnu,
             mipsel_unknown_linux_gnu,
+            powerpc_unknown_linux_gnu,
             arm_linux_androideabi,
             arm_unknown_linux_gnueabi,
             arm_unknown_linux_gnueabihf,