Skip to content

Commit 51b0b37

Browse files
committed
Auto merge of #47392 - kennytm:rollup, r=kennytm
Rollup of 24 pull requests - Successful merges: #46985, #47069, #47081, #47185, #47282, #47283, #47288, #47289, #47298, #47305, #47306, #47307, #47310, #47324, #47328, #47331, #47340, #47343, #47344, #47352, #47357, #47365, #47375, #47382 - Failed merges: #47334
2 parents 0b90e4e + c12eabf commit 51b0b37

File tree

57 files changed

+490
-225
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

+490
-225
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ matrix:
126126
if: branch = auto
127127
- env: IMAGE=dist-armv7-linux DEPLOY=1
128128
if: branch = auto
129-
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
129+
- env: IMAGE=dist-i586-gnu-i586-i686-musl DEPLOY=1
130130
if: branch = auto
131131
- env: IMAGE=dist-i686-freebsd DEPLOY=1
132132
if: branch = auto

src/Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/configure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def v(*args):
108108
"MUSL root installation directory (deprecated)")
109109
v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
110110
"x86_64-unknown-linux-musl install directory")
111+
v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
112+
"i586-unknown-linux-musl install directory")
111113
v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
112114
"i686-unknown-linux-musl install directory")
113115
v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",

src/bootstrap/native.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ impl Step for Openssl {
429429
"arm-unknown-linux-gnueabihf" => "linux-armv4",
430430
"armv7-linux-androideabi" => "android-armv7",
431431
"armv7-unknown-linux-gnueabihf" => "linux-armv4",
432+
"i586-unknown-linux-gnu" => "linux-elf",
433+
"i586-unknown-linux-musl" => "linux-elf",
432434
"i686-apple-darwin" => "darwin-i386-cc",
433435
"i686-linux-android" => "android-x86",
434436
"i686-unknown-freebsd" => "BSD-x86-elf",

src/ci/docker/dist-i586-gnu-i686-musl/Dockerfile renamed to src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ COPY scripts/musl.sh /build/
2121
RUN CC=gcc CFLAGS="-m32 -fPIC -Wa,-mrelax-relocations=no" \
2222
CXX=g++ CXXFLAGS="-m32 -Wa,-mrelax-relocations=no" \
2323
bash musl.sh i686 --target=i686 && \
24+
CC=gcc CFLAGS="-march=pentium -m32 -fPIC -Wa,-mrelax-relocations=no" \
25+
CXX=g++ CXXFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
26+
bash musl.sh i586 --target=i586 && \
2427
rm -rf /build
2528

2629
COPY scripts/sccache.sh /scripts/
2730
RUN sh /scripts/sccache.sh
2831

2932
ENV RUST_CONFIGURE_ARGS \
3033
--target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
34+
--musl-root-i586=/musl-i586 \
3135
--musl-root-i686=/musl-i686 \
3236
--enable-extended
3337

@@ -38,12 +42,13 @@ ENV RUST_CONFIGURE_ARGS \
3842
# See: https://github.com/rust-lang/rust/issues/34978
3943
ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
4044
ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
45+
# FIXME remove -Wl,-melf_i386 after cc is updated to include
46+
# https://github.com/alexcrichton/cc-rs/pull/281
47+
ENV CFLAGS_i586_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wl,-melf_i386"
48+
49+
ENV TARGETS=i586-unknown-linux-gnu
50+
ENV TARGETS=$TARGETS,i686-unknown-linux-musl
4151

4252
ENV SCRIPT \
43-
python2.7 ../x.py test \
44-
--target i686-unknown-linux-musl \
45-
--target i586-unknown-linux-gnu \
46-
&& \
47-
python2.7 ../x.py dist \
48-
--target i686-unknown-linux-musl \
49-
--target i586-unknown-linux-gnu
53+
python2.7 ../x.py test --target $TARGETS && \
54+
python2.7 ../x.py dist --target $TARGETS,i586-unknown-linux-musl

src/ci/docker/scripts/musl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ exit 1
3030
TAG=$1
3131
shift
3232

33-
MUSL=musl-1.1.17
33+
MUSL=musl-1.1.18
3434

3535
# may have been downloaded in a previous run
3636
if [ ! -d $MUSL ]; then
@@ -39,7 +39,7 @@ fi
3939

4040
cd $MUSL
4141
./configure --disable-shared --prefix=/musl-$TAG $@
42-
if [ "$TAG" = "i686" ]; then
42+
if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then
4343
hide_output make -j$(nproc) AR=ar RANLIB=ranlib
4444
else
4545
hide_output make -j$(nproc)

src/libarena/lib.rs

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ struct TypedArenaChunk<T> {
6969
impl<T> TypedArenaChunk<T> {
7070
#[inline]
7171
unsafe fn new(capacity: usize) -> TypedArenaChunk<T> {
72-
TypedArenaChunk { storage: RawVec::with_capacity(capacity) }
72+
TypedArenaChunk {
73+
storage: RawVec::with_capacity(capacity),
74+
}
7375
}
7476

7577
/// Destroys this arena chunk.
@@ -132,7 +134,9 @@ impl<T> TypedArena<T> {
132134

133135
unsafe {
134136
if mem::size_of::<T>() == 0 {
135-
self.ptr.set(intrinsics::arith_offset(self.ptr.get() as *mut u8, 1) as *mut T);
137+
self.ptr
138+
.set(intrinsics::arith_offset(self.ptr.get() as *mut u8, 1)
139+
as *mut T);
136140
let ptr = mem::align_of::<T>() as *mut T;
137141
// Don't drop the object. This `write` is equivalent to `forget`.
138142
ptr::write(ptr, object);
@@ -157,7 +161,9 @@ impl<T> TypedArena<T> {
157161
/// - Zero-length slices
158162
#[inline]
159163
pub fn alloc_slice(&self, slice: &[T]) -> &mut [T]
160-
where T: Copy {
164+
where
165+
T: Copy,
166+
{
161167
assert!(mem::size_of::<T>() != 0);
162168
assert!(slice.len() != 0);
163169

@@ -321,7 +327,10 @@ impl DroplessArena {
321327
let (chunk, mut new_capacity);
322328
if let Some(last_chunk) = chunks.last_mut() {
323329
let used_bytes = self.ptr.get() as usize - last_chunk.start() as usize;
324-
if last_chunk.storage.reserve_in_place(used_bytes, needed_bytes) {
330+
if last_chunk
331+
.storage
332+
.reserve_in_place(used_bytes, needed_bytes)
333+
{
325334
self.end.set(last_chunk.end());
326335
return;
327336
} else {
@@ -357,9 +366,9 @@ impl DroplessArena {
357366

358367
let ptr = self.ptr.get();
359368
// Set the pointer past ourselves
360-
self.ptr.set(intrinsics::arith_offset(
361-
self.ptr.get(), mem::size_of::<T>() as isize
362-
) as *mut u8);
369+
self.ptr.set(
370+
intrinsics::arith_offset(self.ptr.get(), mem::size_of::<T>() as isize) as *mut u8,
371+
);
363372
// Write into uninitialized memory.
364373
ptr::write(ptr as *mut T, object);
365374
&mut *(ptr as *mut T)
@@ -375,7 +384,9 @@ impl DroplessArena {
375384
/// - Zero-length slices
376385
#[inline]
377386
pub fn alloc_slice<T>(&self, slice: &[T]) -> &mut [T]
378-
where T: Copy {
387+
where
388+
T: Copy,
389+
{
379390
assert!(!mem::needs_drop::<T>());
380391
assert!(mem::size_of::<T>() != 0);
381392
assert!(slice.len() != 0);
@@ -391,7 +402,8 @@ impl DroplessArena {
391402
unsafe {
392403
let arena_slice = slice::from_raw_parts_mut(self.ptr.get() as *mut T, slice.len());
393404
self.ptr.set(intrinsics::arith_offset(
394-
self.ptr.get(), (slice.len() * mem::size_of::<T>()) as isize
405+
self.ptr.get(),
406+
(slice.len() * mem::size_of::<T>()) as isize,
395407
) as *mut u8);
396408
arena_slice.copy_from_slice(slice);
397409
arena_slice
@@ -456,8 +468,9 @@ mod tests {
456468

457469
let arena = Wrap(TypedArena::new());
458470

459-
let result =
460-
arena.alloc_outer(|| Outer { inner: arena.alloc_inner(|| Inner { value: 10 }) });
471+
let result = arena.alloc_outer(|| Outer {
472+
inner: arena.alloc_inner(|| Inner { value: 10 }),
473+
});
461474

462475
assert_eq!(result.inner.value, 10);
463476
}

src/libcore/tests/num/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ test_impl_from! { test_u16f64, u16, f64 }
197197
test_impl_from! { test_u32f64, u32, f64 }
198198

199199
// Float -> Float
200-
#[cfg_attr(all(target_arch = "wasm32", target_os = "emscripten"), ignore)] // issue 42630
201200
#[test]
202201
fn test_f32f64() {
203202
use core::f32;

src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#![feature(drain_filter)]
4949
#![feature(dyn_trait)]
5050
#![feature(from_ref)]
51+
#![feature(fs_read_write)]
5152
#![feature(i128)]
5253
#![feature(i128_type)]
5354
#![feature(inclusive_range)]

src/librustc/lint/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ pub fn check_ast_crate(sess: &Session, krate: &ast::Crate) {
10461046
// calculated the lint levels for all AST nodes.
10471047
for (_id, lints) in cx.buffered.map {
10481048
for early_lint in lints {
1049-
span_bug!(early_lint.span, "failed to process bufferd lint here");
1049+
span_bug!(early_lint.span, "failed to process buffered lint here");
10501050
}
10511051
}
10521052
}

0 commit comments

Comments
 (0)