Skip to content

Rollup of 8 pull requests #50449

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

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Carol Willing <[email protected]>
Chris C Cerami <[email protected]> Chris C Cerami <[email protected]>
Chris Pressey <[email protected]>
Chris Thorn <[email protected]> Chris Thorn <[email protected]>
Chris Vittal <[email protected]> Christopher Vittal <[email protected]>
Clark Gaebel <[email protected]> <[email protected]>
Clinton Ryan <[email protected]>
Corey Richardson <[email protected]> Elaine "See More" Nemo <[email protected]>
Expand Down
40 changes: 36 additions & 4 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ def v(*args):
"arm-unknown-linux-musleabi install directory")
v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
"arm-unknown-linux-musleabihf install directory")
v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
"armv5te-unknown-linux-musleabi install directory")
v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root",
"armv7-unknown-linux-musleabihf install directory")
v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
Expand Down
10 changes: 9 additions & 1 deletion src/ci/docker/dist-various-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ ENV STAGING_DIR=/tmp

COPY scripts/musl.sh /build
RUN env \
CC=arm-linux-gnueabi-gcc CFLAGS="-march=armv5te -marm -mfloat-abi=soft" \
CXX=arm-linux-gnueabi-g++ CXXFLAGS="-march=armv5te -marm -mfloat-abi=soft" \
bash musl.sh armv5te && \
env \
CC=arm-linux-gnueabi-gcc CFLAGS="-march=armv6 -marm" \
CXX=arm-linux-gnueabi-g++ CXXFLAGS="-march=armv6 -marm" \
bash musl.sh arm && \
Expand Down Expand Up @@ -84,6 +88,7 @@ ENV TARGETS=$TARGETS,mipsel-unknown-linux-musl
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
ENV TARGETS=$TARGETS,armv5te-unknown-linux-gnueabi
ENV TARGETS=$TARGETS,armv5te-unknown-linux-musleabi
ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
ENV TARGETS=$TARGETS,aarch64-unknown-linux-musl
ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
Expand All @@ -100,9 +105,12 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
CC_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \
CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -marm -mfloat-abi=soft"
CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -marm -mfloat-abi=soft" \
CC_armv5te_unknown_linux_musleabi=arm-linux-gnueabi-gcc \
CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft"

ENV RUST_CONFIGURE_ARGS \
--musl-root-armv5te=/musl-armv5te \
--musl-root-arm=/musl-arm \
--musl-root-armhf=/musl-armhf \
--musl-root-armv7=/musl-armv7 \
Expand Down
1 change: 1 addition & 0 deletions src/ci/docker/mingw-check/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
ENV SCRIPT python2.7 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu
2 changes: 1 addition & 1 deletion src/ci/docker/x86_64-gnu-debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV PARALLEL_CHECK 1
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--enable-debug \
Expand Down
4 changes: 2 additions & 2 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ fi
# sccache server at the start of the build, but no need to worry if this fails.
SCCACHE_IDLE_TIMEOUT=10800 sccache --start-server || true

if [ "$PARALLEL_CHECK" != "" ]; then
if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
$SRC/configure --enable-experimental-parallel-queries
python2.7 ../x.py check
CARGO_INCREMENTAL=0 python2.7 ../x.py check
rm -f config.toml
rm -rf build
fi
Expand Down
2 changes: 1 addition & 1 deletion src/doc/nomicon
2 changes: 1 addition & 1 deletion src/doc/reference
2 changes: 1 addition & 1 deletion src/librustc_save_analysis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rustc_target = { path = "../librustc_target" }
rustc_typeck = { path = "../librustc_typeck" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
rls-data = "0.15"
rls-data = "0.16"
rls-span = "0.4"
# FIXME(#40527) should move rustc serialize out of tree
rustc-serialize = "0.3"
100 changes: 8 additions & 92 deletions src/librustc_save_analysis/dump_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,80 +268,6 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
}
}

fn process_def_kind(
&mut self,
ref_id: NodeId,
span: Span,
sub_span: Option<Span>,
def_id: DefId,
) {
if self.span.filter_generated(sub_span, span) {
return;
}

let def = self.save_ctxt.get_path_def(ref_id);
match def {
HirDef::Mod(_) => {
let span = self.span_from_span(sub_span.expect("No span found for mod ref"));
self.dumper.dump_ref(Ref {
kind: RefKind::Mod,
span,
ref_id: ::id_from_def_id(def_id),
});
}
HirDef::Struct(..) |
HirDef::Variant(..) |
HirDef::Union(..) |
HirDef::Enum(..) |
HirDef::TyAlias(..) |
HirDef::TyForeign(..) |
HirDef::TraitAlias(..) |
HirDef::Trait(_) => {
let span = self.span_from_span(sub_span.expect("No span found for type ref"));
self.dumper.dump_ref(Ref {
kind: RefKind::Type,
span,
ref_id: ::id_from_def_id(def_id),
});
}
HirDef::Static(..) |
HirDef::Const(..) |
HirDef::StructCtor(..) |
HirDef::VariantCtor(..) => {
let span = self.span_from_span(sub_span.expect("No span found for var ref"));
self.dumper.dump_ref(Ref {
kind: RefKind::Variable,
span,
ref_id: ::id_from_def_id(def_id),
});
}
HirDef::Fn(..) => {
let span = self.span_from_span(sub_span.expect("No span found for fn ref"));
self.dumper.dump_ref(Ref {
kind: RefKind::Function,
span,
ref_id: ::id_from_def_id(def_id),
});
}
// With macros 2.0, we can legitimately get a ref to a macro, but
// we don't handle it properly for now (FIXME).
HirDef::Macro(..) => {}
HirDef::Local(..) |
HirDef::Upvar(..) |
HirDef::SelfTy(..) |
HirDef::Label(_) |
HirDef::TyParam(..) |
HirDef::Method(..) |
HirDef::AssociatedTy(..) |
HirDef::AssociatedConst(..) |
HirDef::PrimTy(_) |
HirDef::GlobalAsm(_) |
HirDef::Err => {
span_bug!(span, "process_def_kind for unexpected item: {:?}", def);
}
}
}

fn process_formals(&mut self, formals: &'l [ast::Arg], qualname: &str) {
for arg in formals {
self.visit_pat(&arg.pat);
Expand Down Expand Up @@ -1348,29 +1274,17 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
};

let sub_span = self.span.span_for_last_ident(path.span);
let mod_id = match self.lookup_def_id(id) {
Some(def_id) => {
self.process_def_kind(id, path.span, sub_span, def_id);
Some(def_id)
}
None => None,
};

// 'use' always introduces an alias, if there is not an explicit
// one, there is an implicit one.
let sub_span = match self.span.sub_span_after_keyword(use_tree.span,
keywords::As) {
Some(sub_span) => Some(sub_span),
None => sub_span,
};
let alias_span = self.span.sub_span_after_keyword(use_tree.span, keywords::As);
let ref_id = self.lookup_def_id(id);

if !self.span.filter_generated(sub_span, path.span) {
let span =
self.span_from_span(sub_span.expect("No span found for use"));
let span = self.span_from_span(sub_span.expect("No span found for use"));
let alias_span = alias_span.map(|sp| self.span_from_span(sp));
self.dumper.import(&access, Import {
kind: ImportKind::Use,
ref_id: mod_id.map(|id| ::id_from_def_id(id)),
ref_id: ref_id.map(|id| ::id_from_def_id(id)),
span,
alias_span,
name: ident.to_string(),
value: String::new(),
parent,
Expand Down Expand Up @@ -1407,6 +1321,7 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
kind: ImportKind::GlobUse,
ref_id: None,
span,
alias_span: None,
name: "*".to_owned(),
value: names.join(", "),
parent,
Expand Down Expand Up @@ -1500,6 +1415,7 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tc
kind: ImportKind::ExternCrate,
ref_id: None,
span,
alias_span: None,
name: item.ident.to_string(),
value: String::new(),
parent,
Expand Down
38 changes: 38 additions & 0 deletions src/librustc_target/spec/armv5te_unknown_linux_musleabi.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2018 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 spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
let base = super::linux_musl_base::opts();
Ok(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: "armv5te-unknown-linux-gnueabi".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "32".to_string(),
target_c_int_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: "musl".to_string(),
target_vendor: "unknown".to_string(),
linker_flavor: LinkerFlavor::Gcc,

options: TargetOptions {
features: "+soft-float,+strict-align".to_string(),
// Atomic operations provided by compiler-builtins
max_atomic_width: Some(32),
abi_blacklist: super::arm_base::abi_blacklist(),
.. base
}
})
}
1 change: 1 addition & 0 deletions src/librustc_target/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ supported_targets! {
("arm-unknown-linux-musleabihf", arm_unknown_linux_musleabihf),
("armv4t-unknown-linux-gnueabi", armv4t_unknown_linux_gnueabi),
("armv5te-unknown-linux-gnueabi", armv5te_unknown_linux_gnueabi),
("armv5te-unknown-linux-musleabi", armv5te_unknown_linux_musleabi),
("armv7-unknown-linux-gnueabihf", armv7_unknown_linux_gnueabihf),
("armv7-unknown-linux-musleabihf", armv7_unknown_linux_musleabihf),
("aarch64-unknown-linux-gnu", aarch64_unknown_linux_gnu),
Expand Down
7 changes: 4 additions & 3 deletions src/test/ui/update-references.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ shopt -s nullglob
while [[ "$1" != "" ]]; do
for EXT in "stderr" "stdout"; do
for OUT_NAME in $BUILD_DIR/${1%.rs}.*$EXT; do
OUT_DIR=`dirname "$1"`
OUT_BASE=`basename "$OUT_NAME"`
if ! (diff $OUT_NAME $MYDIR/$OUT_BASE >& /dev/null); then
echo updating $MYDIR/$OUT_BASE
cp $OUT_NAME $MYDIR
if ! (diff $OUT_NAME $MYDIR/$OUT_DIR/$OUT_BASE >& /dev/null); then
echo updating $MYDIR/$OUT_DIR/$OUT_BASE
cp $OUT_NAME $MYDIR/$OUT_DIR
fi
done
done
Expand Down
1 change: 1 addition & 0 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ static TARGETS: &'static [&'static str] = &[
"arm-unknown-linux-musleabi",
"arm-unknown-linux-musleabihf",
"armv5te-unknown-linux-gnueabi",
"armv5te-unknown-linux-musleabi",
"armv7-apple-ios",
"armv7-linux-androideabi",
"armv7-unknown-cloudabi-eabihf",
Expand Down
Loading