diff options
| author | bors <bors@rust-lang.org> | 2016-10-29 00:28:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-29 00:28:39 -0700 |
| commit | 5db21c3af66ccd6d3c48d420a036c65e6f7711ed (patch) | |
| tree | 9e3ecfa3683ca4493645a2f5ddd74375b105ccde | |
| parent | 17e9d9ae82149202908b5674966df86c0a1a5799 (diff) | |
| parent | c4651dba5f8fcbdd9b678db87405aaa643f82600 (diff) | |
| download | rust-5db21c3af66ccd6d3c48d420a036c65e6f7711ed.tar.gz rust-5db21c3af66ccd6d3c48d420a036c65e6f7711ed.zip | |
Auto merge of #37387 - raphlinus:fuchsia_aarch64, r=alexcrichton
Support for aarch64 architecture on Fuchsia This patch adds support for the aarch64-unknown-fuchsia target. Also updates src/liblibc submodule to include required libc change.
| -rw-r--r-- | mk/cfg/aarch64-unknown-fuchsia.mk | 1 | ||||
| m--------- | src/liblibc | 0 | ||||
| -rw-r--r-- | src/librustc_back/target/aarch64_unknown_fuchsia.rs | 28 | ||||
| -rw-r--r-- | src/librustc_back/target/mod.rs | 1 | ||||
| -rw-r--r-- | src/libstd/os/raw.rs | 6 |
5 files changed, 34 insertions, 2 deletions
diff --git a/mk/cfg/aarch64-unknown-fuchsia.mk b/mk/cfg/aarch64-unknown-fuchsia.mk new file mode 100644 index 00000000000..34aee77ae21 --- /dev/null +++ b/mk/cfg/aarch64-unknown-fuchsia.mk @@ -0,0 +1 @@ +# rustbuild-only target diff --git a/src/liblibc b/src/liblibc -Subproject c95defce07a82f2f759f140c937dabd43a4f3d9 +Subproject 7d9b71f0971f8fa196d864d7071f216a59036d6 diff --git a/src/librustc_back/target/aarch64_unknown_fuchsia.rs b/src/librustc_back/target/aarch64_unknown_fuchsia.rs new file mode 100644 index 00000000000..a93a46d1402 --- /dev/null +++ b/src/librustc_back/target/aarch64_unknown_fuchsia.rs @@ -0,0 +1,28 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use target::{Target, TargetResult}; + +pub fn target() -> TargetResult { + let mut base = super::fuchsia_base::opts(); + base.max_atomic_width = Some(128); + + Ok(Target { + llvm_target: "aarch64-unknown-fuchsia".to_string(), + target_endian: "little".to_string(), + target_pointer_width: "64".to_string(), + data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), + arch: "aarch64".to_string(), + target_os: "fuchsia".to_string(), + target_env: "".to_string(), + target_vendor: "unknown".to_string(), + options: base, + }) +} diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index fc52f46a514..4d9315a1a3b 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -177,6 +177,7 @@ supported_targets! { ("x86_64-apple-darwin", x86_64_apple_darwin), ("i686-apple-darwin", i686_apple_darwin), + ("aarch64-unknown-fuchsia", aarch64_unknown_fuchsia), ("x86_64-unknown-fuchsia", x86_64_unknown_fuchsia), ("i386-apple-ios", i386_apple_ios), diff --git a/src/libstd/os/raw.rs b/src/libstd/os/raw.rs index 6c5c1b90a4a..2a918d8aeb7 100644 --- a/src/libstd/os/raw.rs +++ b/src/libstd/os/raw.rs @@ -18,7 +18,8 @@ target_arch = "arm", target_arch = "powerpc", target_arch = "powerpc64", - target_arch = "s390x"))))] + target_arch = "s390x")), + all(target_os = "fuchsia", target_arch = "aarch64")))] #[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = u8; #[cfg(not(any(target_os = "android", target_os = "emscripten", @@ -26,7 +27,8 @@ target_arch = "arm", target_arch = "powerpc", target_arch = "powerpc64", - target_arch = "s390x")))))] + target_arch = "s390x")), + all(target_os = "fuchsia", target_arch = "aarch64"))))] #[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = i8; #[stable(feature = "raw_os", since = "1.1.0")] pub type c_schar = i8; #[stable(feature = "raw_os", since = "1.1.0")] pub type c_uchar = u8; |
