Skip to content

Commit a195fd4

Browse files
authored
Merge pull request #17 from rust-lang/master
Sync to rust-lang/libc branch master
2 parents 7f753ce + 90269e8 commit a195fd4

File tree

57 files changed

+400
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+400
-65
lines changed

.cirrus.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
task:
2+
name: nightly x86_64-unknown-freebsd-10
3+
freebsd_instance:
4+
image: freebsd-10-4-release-amd64
5+
setup_script:
6+
- pkg install -y curl
7+
- curl https://sh.rustup.rs -sSf --output rustup.sh
8+
- sh rustup.sh --default-toolchain nightly -y
9+
- . $HOME/.cargo/env
10+
- rustup default nightly
11+
test_script:
12+
- . $HOME/.cargo/env
13+
- LIBC_CI=1 sh ci/run.sh x86_64-unknown-freebsd
14+
115
task:
216
name: stable x86_64-unknown-freebsd-11
317
freebsd_instance:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Consequently, this indicates where an API should be added! Adding an API at a
2121
particular level in the hierarchy means that it is supported on all the child
2222
platforms of that level. For example, when adding a Unix API it should be added
2323
to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to
24-
`src/unix/notbsd/linux/mod.rs`.
24+
`src/unix/linux_like/linux/mod.rs`.
2525

2626
If you're not 100% sure at what level of the hierarchy an API should be added
2727
at, fear not! This crate has CI support which tests any binding against all

build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ fn main() {
1616
);
1717
}
1818

19-
// The ABI of libc is backward compatible with FreeBSD 11.
19+
// The ABI of libc used by libstd is backward compatible with FreeBSD 10.
20+
// The ABI of libc from crates.io is backward compatible with FreeBSD 11.
2021
//
2122
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
2223
// running tests to ensure that the ABI is correct.
2324
match which_freebsd() {
25+
Some(10) if libc_ci || rustc_dep_of_std => {
26+
println!("cargo:rustc-cfg=freebsd10")
27+
}
2428
Some(11) if libc_ci => println!("cargo:rustc-cfg=freebsd11"),
2529
Some(12) if libc_ci => println!("cargo:rustc-cfg=freebsd12"),
2630
Some(13) if libc_ci => println!("cargo:rustc-cfg=freebsd13"),
@@ -109,6 +113,7 @@ fn which_freebsd() -> Option<i32> {
109113
let stdout = stdout.unwrap();
110114

111115
match &stdout {
116+
s if s.starts_with("10") => Some(10),
112117
s if s.starts_with("11") => Some(11),
113118
s if s.starts_with("12") => Some(12),
114119
s if s.starts_with("13") => Some(13),

ci/azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
TARGET: x86_64-unknown-linux-gnu
2626

2727
- job: DockerLinuxTier2
28-
dependsOn: DockerLinuxTier1
28+
#dependsOn: DockerLinuxTier1
2929
pool:
3030
vmImage: ubuntu-16.04
3131
steps:

ci/build.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Checks that libc builds properly for all supported targets on a particular
44
# Rust version:
5+
# The FILTER environment variable can be used to select which target(s) to build.
6+
# For example: set FILTER to vxworks to select the targets that has vxworks in name
57

68
set -ex
79

@@ -176,7 +178,9 @@ case "${OS}" in
176178
esac
177179

178180
for TARGET in $TARGETS; do
179-
test_target build "$TARGET"
181+
if echo "$TARGET"|grep -q "$FILTER";then
182+
test_target build "$TARGET"
183+
fi
180184
done
181185

182186
# FIXME: https://github.com/rust-lang/rust/issues/58564
@@ -237,7 +241,9 @@ powerpc64-wrs-vxworks \
237241

238242
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then
239243
for TARGET in $RUST_LINUX_NO_CORE_TARGETS; do
240-
test_target xbuild "$TARGET" 1
244+
if echo "$TARGET"|grep -q "$FILTER";then
245+
test_target xbuild "$TARGET" 1
246+
fi
241247
done
242248

243249
# Nintendo switch

0 commit comments

Comments
 (0)