Skip to content

Commit ecbf0b5

Browse files
committed
Auto merge of #40046 - brson:beta-next, r=alexcrichton
[beta] next - #39913 - #39730 - #39674 - #39602 - #39586 - #39471 - #39980 - #40020 - #40135 @nikomatsakis [this commit](3787d33) did not pick cleanly. You might peek at it. I took the liberty of accepting all the nominations myself, but the [packed struct alignment](#39586) PR is quite large. It did pick fine though and there's a comment there suggesting it works on beta cc @rust-lang/compiler. cc @alexcrichton
2 parents bc15d52 + f0477b2 commit ecbf0b5

Some content is hidden

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

58 files changed

+1102
-602
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ matrix:
1212
fast_finish: true
1313
include:
1414
# Linux builders, all docker images
15-
- env: IMAGE=android DEPLOY=1
15+
- env: IMAGE=arm-android
1616
- env: IMAGE=cross DEPLOY=1
1717
- env: IMAGE=linux-tested-targets DEPLOY=1
18+
- env: IMAGE=dist-android DEPLOY=1
1819
- env: IMAGE=dist-arm-linux DEPLOY=1
1920
- env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
2021
- env: IMAGE=dist-freebsd DEPLOY=1

mk/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.16.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=.2
21+
CFG_PRERELEASE_VERSION=.3
2222

2323
ifeq ($(CFG_RELEASE_CHANNEL),stable)
2424
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"

src/bootstrap/bootstrap.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,14 @@ def main():
438438
rb.use_vendored_sources = '\nvendor = true' in rb.config_toml or \
439439
'CFG_ENABLE_VENDOR' in rb.config_mk
440440

441-
if 'SUDO_USER' in os.environ:
442-
if os.environ['USER'] != os.environ['SUDO_USER']:
441+
if 'SUDO_USER' in os.environ and not rb.use_vendored_sources:
442+
if os.environ.get('USER') != os.environ['SUDO_USER']:
443443
rb.use_vendored_sources = True
444444
print('info: looks like you are running this command under `sudo`')
445445
print(' and so in order to preserve your $HOME this will now')
446446
print(' use vendored sources by default. Note that if this')
447447
print(' does not work you should run a normal build first')
448-
print(' before running a command like `sudo make intall`')
448+
print(' before running a command like `sudo make install`')
449449

450450
if rb.use_vendored_sources:
451451
if not os.path.exists('.cargo'):

src/bootstrap/sanity.rs

-4
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
198198
");
199199
}
200200
}
201-
202-
if target.contains("arm-linux-android") {
203-
need_cmd("adb".as_ref());
204-
}
205201
}
206202

207203
for host in build.flags.host.iter() {

src/ci/docker/arm-android/Dockerfile

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM ubuntu:16.04
2+
3+
RUN dpkg --add-architecture i386 && \
4+
apt-get update && \
5+
apt-get install -y --no-install-recommends \
6+
g++ \
7+
make \
8+
file \
9+
curl \
10+
ca-certificates \
11+
python2.7 \
12+
git \
13+
cmake \
14+
unzip \
15+
expect \
16+
openjdk-9-jre \
17+
sudo \
18+
libstdc++6:i386 \
19+
xz-utils \
20+
libssl-dev \
21+
pkg-config
22+
23+
WORKDIR /android/
24+
ENV PATH=$PATH:/android/ndk-arm-9/bin:/android/sdk/tools:/android/sdk/platform-tools
25+
26+
COPY install-ndk.sh install-sdk.sh accept-licenses.sh /android/
27+
RUN sh /android/install-ndk.sh
28+
RUN sh /android/install-sdk.sh
29+
30+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
31+
dpkg -i dumb-init_*.deb && \
32+
rm dumb-init_*.deb
33+
34+
COPY start-emulator.sh /android/
35+
36+
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/android/start-emulator.sh"]
37+
38+
RUN curl -o /usr/local/bin/sccache \
39+
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-24-sccache-x86_64-unknown-linux-gnu && \
40+
chmod +x /usr/local/bin/sccache
41+
42+
ENV RUST_CONFIGURE_ARGS \
43+
--target=arm-linux-androideabi \
44+
--arm-linux-androideabi-ndk=/android/ndk-arm-9
45+
46+
ENV SCRIPT python2.7 ../x.py test --target arm-linux-androideabi
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
cpgdb() {
15+
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb /android/$1/bin/$2-gdb
16+
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb-orig /android/$1/bin/gdb-orig
17+
cp -r android-ndk-r11c/prebuilt/linux-x86_64/share /android/$1/share
18+
}
19+
20+
# Prep the Android NDK
21+
#
22+
# See https://github.com/servo/servo/wiki/Building-for-Android
23+
curl -O https://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
24+
unzip -q android-ndk-r11c-linux-x86_64.zip
25+
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
26+
--platform=android-9 \
27+
--toolchain=arm-linux-androideabi-4.9 \
28+
--install-dir=/android/ndk-arm-9 \
29+
--ndk-dir=/android/android-ndk-r11c \
30+
--arch=arm
31+
cpgdb ndk-arm-9 arm-linux-androideabi
32+
33+
rm -rf ./android-ndk-r11c-linux-x86_64.zip ./android-ndk-r11c
File renamed without changes.

src/ci/docker/android/Dockerfile src/ci/docker/dist-android/Dockerfile

+3-11
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,13 @@ RUN dpkg --add-architecture i386 && \
2121
WORKDIR /android/
2222
ENV PATH=$PATH:/android/ndk-arm-9/bin:/android/sdk/tools:/android/sdk/platform-tools
2323

24-
COPY install-ndk.sh install-sdk.sh accept-licenses.sh /android/
24+
COPY install-ndk.sh /android/
2525
RUN sh /android/install-ndk.sh
26-
RUN sh /android/install-sdk.sh
2726

2827
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
2928
dpkg -i dumb-init_*.deb && \
3029
rm dumb-init_*.deb
31-
32-
COPY start-emulator.sh /android/
33-
34-
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/android/start-emulator.sh"]
30+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
3531

3632
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
3733
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
@@ -49,8 +45,4 @@ ENV RUST_CONFIGURE_ARGS \
4945
--i686-linux-android-ndk=/android/ndk-x86-9 \
5046
--aarch64-linux-android-ndk=/android/ndk-aarch64
5147

52-
# Just a smoke test in dist to see if this works for now, we should expand this
53-
# to all the targets above eventually.
54-
ENV SCRIPT \
55-
python2.7 ../x.py test --target arm-linux-androideabi && \
56-
python2.7 ../x.py dist --target $TARGETS
48+
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS

src/ci/docker/android/install-ndk.sh src/ci/docker/dist-android/install-ndk.sh

-7
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111

1212
set -ex
1313

14-
cpgdb() {
15-
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb /android/$1/bin/$2-gdb
16-
cp android-ndk-r11c/prebuilt/linux-x86_64/bin/gdb-orig /android/$1/bin/gdb-orig
17-
cp -r android-ndk-r11c/prebuilt/linux-x86_64/share /android/$1/share
18-
}
19-
2014
# Prep the Android NDK
2115
#
2216
# See https://github.com/servo/servo/wiki/Building-for-Android
@@ -28,7 +22,6 @@ bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
2822
--install-dir=/android/ndk-arm-9 \
2923
--ndk-dir=/android/android-ndk-r11c \
3024
--arch=arm
31-
cpgdb ndk-arm-9 arm-linux-androideabi
3225
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
3326
--platform=android-21 \
3427
--toolchain=aarch64-linux-android-4.9 \

0 commit comments

Comments
 (0)