-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add ARM MUSL targets #33189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ARM MUSL targets #33189
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is intentially left empty to indicate that, while this target is | ||
# supported, it's not supported using plain GNU Make builds. Use a --rustbuild | ||
# instead. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is intentially left empty to indicate that, while this target is | ||
# supported, it's not supported using plain GNU Make builds. Use a --rustbuild | ||
# instead. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is intentially left empty to indicate that, while this target is | ||
# supported, it's not supported using plain GNU Make builds. Use a --rustbuild | ||
# instead. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
+2 −2 | .travis.yml | |
+1 −1 | Cargo.toml | |
+2 −3 | README.md | |
+2 −2 | libc-test/Cargo.lock | |
+3 −6 | libc-test/build.rs | |
+91 −0 | src/unix/bsd/apple/mod.rs | |
+104 −1 | src/unix/bsd/freebsdlike/mod.rs | |
+42 −0 | src/unix/bsd/openbsdlike/bitrig.rs | |
+60 −0 | src/unix/bsd/openbsdlike/mod.rs | |
+20 −0 | src/unix/bsd/openbsdlike/netbsd.rs | |
+19 −5 | src/unix/mod.rs | |
+4 −0 | src/unix/notbsd/android/b32.rs | |
+4 −0 | src/unix/notbsd/android/b64.rs | |
+18 −1 | src/unix/notbsd/android/mod.rs | |
+18 −0 | src/unix/notbsd/linux/mips.rs | |
+82 −6 | src/unix/notbsd/linux/mod.rs | |
+13 −0 | src/unix/notbsd/linux/musl/b32/x86.rs | |
+15 −0 | src/unix/notbsd/linux/musl/b64/x86_64.rs | |
+18 −0 | src/unix/notbsd/linux/other/mod.rs | |
+25 −4 | src/unix/notbsd/mod.rs | |
+121 −0 | src/unix/solaris/mod.rs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 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; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::musl_base::opts(); | ||
|
||
// Most of these settings are copied from the arm_unknown_linux_gnueabi | ||
// target. | ||
base.features = "+v6".to_string(); | ||
Target { | ||
// It's important we use "gnueabi" and not "musleabi" here. LLVM uses it | ||
// to determine the calling convention and float ABI, and it doesn't | ||
// support the "musleabi" value. | ||
llvm_target: "arm-unknown-linux-gnueabi".to_string(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it intentional to pass "gneuabi" to LLVM instead of "musleabi"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it is. I believe the comment above explains why :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow I can totally read |
||
target_endian: "little".to_string(), | ||
target_pointer_width: "32".to_string(), | ||
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), | ||
arch: "arm".to_string(), | ||
target_os: "linux".to_string(), | ||
target_env: "musleabi".to_string(), | ||
target_vendor: "unknown".to_string(), | ||
options: base, | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 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; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::musl_base::opts(); | ||
|
||
// Most of these settings are copied from the arm_unknown_linux_gnueabihf | ||
// target. | ||
base.features = "+v6,+vfp2".to_string(); | ||
Target { | ||
// It's important we use "gnueabihf" and not "musleabihf" here. LLVM | ||
// uses it to determine the calling convention and float ABI, and it | ||
// doesn't support the "musleabihf" value. | ||
llvm_target: "arm-unknown-linux-gnueabihf".to_string(), | ||
target_endian: "little".to_string(), | ||
target_pointer_width: "32".to_string(), | ||
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), | ||
arch: "arm".to_string(), | ||
target_os: "linux".to_string(), | ||
target_env: "musleabi".to_string(), | ||
target_vendor: "unknown".to_string(), | ||
options: base, | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// 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; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::musl_base::opts(); | ||
|
||
// Most of these settings are copied from the armv7_unknown_linux_gnueabihf | ||
// target. | ||
base.features = "+v7,+vfp3,+neon".to_string(); | ||
base.cpu = "cortex-a8".to_string(); | ||
Target { | ||
// It's important we use "gnueabihf" and not "musleabihf" here. LLVM | ||
// uses it to determine the calling convention and float ABI, and LLVM | ||
// doesn't support the "musleabihf" value. | ||
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), | ||
target_endian: "little".to_string(), | ||
target_pointer_width: "32".to_string(), | ||
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), | ||
arch: "arm".to_string(), | ||
target_os: "linux".to_string(), | ||
target_env: "musleabi".to_string(), | ||
target_vendor: "unknown".to_string(), | ||
options: base, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wut
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I not make any sense? I can try to clarify it further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, to expand, that comment from me typically means something along the lines of: "good lord build systems are hilariously complicated and are essentially a never-ending bugs where nothing works unless someone's testing it somewhere"
In other words, the comment here was excellent, I'm just surprised by the need for it at all!