Skip to content
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

Rollup of 11 pull requests #61737

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e02f133
move intrinsics codegen tests into a seperate folder
lcnr Jun 4, 2019
4c44d4a
improve test indentation
lcnr Jun 4, 2019
36601f6
Windows 10 SDK is also required now.
sfengyuan Jun 5, 2019
1cf662e
rephrase
sfengyuan Jun 7, 2019
3d6070d
Neutralize link
sfengyuan Jun 7, 2019
50e0c6c
Delete Rustbook step
Mark-Simulacrum Jun 7, 2019
e70e9c4
Delete unnecessary command
Mark-Simulacrum Jun 7, 2019
0e64a94
Inline prepare_tool_cmd
Mark-Simulacrum Jun 7, 2019
147246c
Make RemoteTestServer a bootstrap tool
Mark-Simulacrum Jun 7, 2019
b15cb0f
Delete unused fields on Crate struct
Mark-Simulacrum Jun 7, 2019
e4c44c7
Remove unnecessary Std dependency
Mark-Simulacrum Jun 7, 2019
41e976b
Azure: retry failed awscli installs
wesleywiser Jun 10, 2019
e3516a1
librustc_errors: Add some more documentation
phansch Jun 9, 2019
33137ff
Address review comments
phansch Jun 10, 2019
7b97cf9
make sure to_ascii_lowercase actually leaves upper-case non-ASCII cha…
RalfJung Jun 10, 2019
9ed4674
typeck: Fix const generic in repeat param ICE.
davidtwco Jun 9, 2019
d3461bf
core: use memcmp optimization for 128 bit integer slices
aschampion Jun 10, 2019
8eb7f36
std: Remove internal definitions of `cfg_if!` macro
alexcrichton Jun 10, 2019
97f4e70
syntax: Remove `SyntaxExtension::IdentTT` and `IdentMacroExpander`
petrochenkov Jun 6, 2019
5a6ebec
syntax: Remove `SyntaxExtension::MultiDecorator` and `MultiItemDecora…
petrochenkov Jun 6, 2019
edb925a
syntax: Use `MultiItemModifier` for built-in derives
petrochenkov Jun 6, 2019
8edbbac
syntax: Remove `SyntaxExtension::DeclMacro`
petrochenkov Jun 6, 2019
0468eb6
syntax: Improve documentation of `SyntaxExtension`
petrochenkov Jun 6, 2019
93eb63c
syntax: Rename variants of `SyntaxExtension` for consistency
petrochenkov Jun 6, 2019
c127f53
Use `for_each` in `Iterator::partition`
cuviper Jun 10, 2019
44033a7
Rollup merge of #61526 - lcnr:test_reorder, r=nikomatsakis
Centril Jun 11, 2019
c426fa5
Rollup merge of #61550 - jacobsun:patch-1, r=alexcrichton
Centril Jun 11, 2019
c6c9f66
Rollup merge of #61606 - petrochenkov:legclean, r=pnkfelix
Centril Jun 11, 2019
d3abd6c
Rollup merge of #61639 - Mark-Simulacrum:bootstrap-cleanup, r=alexcri…
Centril Jun 11, 2019
2c642de
Rollup merge of #61686 - phansch:librustc_errors_docs, r=estebank
Centril Jun 11, 2019
4f6aa0d
Rollup merge of #61698 - davidtwco:ice-const-generic-length, r=varkor
Centril Jun 11, 2019
a845141
Rollup merge of #61707 - wesleywiser:awscli_retry, r=alexcrichton
Centril Jun 11, 2019
503a790
Rollup merge of #61715 - RalfJung:test-ascii-lowercase, r=varkor
Centril Jun 11, 2019
5fa30ca
Rollup merge of #61720 - alexcrichton:libstd-cfg-if-dep, r=sfackler
Centril Jun 11, 2019
e294c42
Rollup merge of #61724 - aschampion:128-bit-memcmp, r=sfackler
Centril Jun 11, 2019
5837b9f
Rollup merge of #61726 - cuviper:partition-for_each, r=scottmcm
Centril Jun 11, 2019
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
3 changes: 2 additions & 1 deletion .azure-pipelines/steps/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ steps:
# images, etc.
- bash: |
set -e
source src/ci/shared.sh
sudo apt-get install -y python3-setuptools
pip3 install awscli --upgrade --user
retry pip3 install awscli --upgrade --user
echo "##vso[task.prependpath]$HOME/.local/bin"
displayName: Install awscli (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,7 @@ name = "panic_unwind"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"cfg-if 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -3338,6 +3339,7 @@ dependencies = [
"alloc 0.0.0",
"backtrace 0.3.29 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -3936,6 +3938,7 @@ name = "unwind"
version = "0.0.0"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"core 0.0.0",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ build.

MSVC builds of Rust additionally require an installation of Visual Studio 2017
(or later) so `rustc` can use its linker. The simplest way is to get the
[Visual Studio Build Tools] and check the “C++ build tools” workload.
[Visual Studio], check the “C++ build tools” and “Windows 10 SDK” workload.

[Visual Studio Build Tools]: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
[Visual Studio]: https://visualstudio.microsoft.com/downloads/

(If you're installing cmake yourself, be careful that “C++ CMake tools for
Windows” doesn't get included under “Individual components”.)
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1693,10 +1693,6 @@ mod __test {
compiler: Compiler { host: a, stage: 1 },
target: b,
},
compile::Std {
compiler: Compiler { host: a, stage: 2 },
target: b,
},
]
);
assert_eq!(
Expand Down
51 changes: 12 additions & 39 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ macro_rules! book {
}

fn run(self, builder: &Builder<'_>) {
builder.ensure(Rustbook {
builder.ensure(RustbookSrc {
target: self.target,
name: INTERNER.intern_str($book_name),
version: $book_ver,
src: doc_src(builder),
})
}
}
Expand All @@ -75,35 +76,8 @@ enum RustbookVersion {
MdBook2,
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
struct Rustbook {
target: Interned<String>,
name: Interned<String>,
version: RustbookVersion,
}

impl Step for Rustbook {
type Output = ();

// rustbook is never directly called, and only serves as a shim for the nomicon and the
// reference.
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.never()
}

/// Invoke `rustbook` for `target` for the doc book `name`.
///
/// This will not actually generate any documentation if the documentation has
/// already been generated.
fn run(self, builder: &Builder<'_>) {
let src = builder.src.join("src/doc");
builder.ensure(RustbookSrc {
target: self.target,
name: self.name,
src: INTERNER.intern_path(src),
version: self.version,
});
}
fn doc_src(builder: &Builder<'_>) -> Interned<PathBuf> {
INTERNER.intern_path(builder.src.join("src/doc"))
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
Expand Down Expand Up @@ -274,33 +248,37 @@ impl Step for TheBook {
let name = self.name;

// build book
builder.ensure(Rustbook {
builder.ensure(RustbookSrc {
target,
name: INTERNER.intern_string(name.to_string()),
version: RustbookVersion::MdBook2,
src: doc_src(builder),
});

// building older edition redirects

let source_name = format!("{}/first-edition", name);
builder.ensure(Rustbook {
builder.ensure(RustbookSrc {
target,
name: INTERNER.intern_string(source_name),
version: RustbookVersion::MdBook2,
src: doc_src(builder),
});

let source_name = format!("{}/second-edition", name);
builder.ensure(Rustbook {
builder.ensure(RustbookSrc {
target,
name: INTERNER.intern_string(source_name),
version: RustbookVersion::MdBook2,
src: doc_src(builder),
});

let source_name = format!("{}/2018-edition", name);
builder.ensure(Rustbook {
builder.ensure(RustbookSrc {
target,
name: INTERNER.intern_string(source_name),
version: RustbookVersion::MdBook2,
src: doc_src(builder),
});

// build the version info page and CSS
Expand Down Expand Up @@ -898,11 +876,6 @@ impl Step for UnstableBookGen {
fn run(self, builder: &Builder<'_>) {
let target = self.target;

builder.ensure(compile::Std {
compiler: builder.compiler(builder.top_stage, builder.config.build),
target,
});

builder.info(&format!("Generating unstable book md files ({})", target));
let out = builder.md_doc_out(target).join("unstable-book");
builder.create_dir(&out);
Expand Down
5 changes: 0 additions & 5 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,9 @@ pub struct Build {
#[derive(Debug)]
struct Crate {
name: Interned<String>,
version: String,
deps: HashSet<Interned<String>>,
id: String,
path: PathBuf,
doc_step: String,
build_step: String,
test_step: String,
bench_step: String,
}

impl Crate {
Expand Down
6 changes: 0 additions & 6 deletions src/bootstrap/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ struct Output {
struct Package {
id: String,
name: String,
version: String,
source: Option<String>,
manifest_path: String,
}
Expand Down Expand Up @@ -84,12 +83,7 @@ fn build_krate(features: &str, build: &mut Build, resolves: &mut Vec<ResolveNode
let mut path = PathBuf::from(package.manifest_path);
path.pop();
build.crates.insert(name, Crate {
build_step: format!("build-crate-{}", name),
doc_step: format!("doc-crate-{}", name),
test_step: format!("test-crate-{}", name),
bench_step: format!("bench-crate-{}", name),
name,
version: package.version,
id: package.id,
deps: HashSet::new(),
path,
Expand Down
63 changes: 9 additions & 54 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,6 @@ macro_rules! bootstrap_tool {
}

impl Tool {
pub fn get_mode(&self) -> Mode {
Mode::ToolBootstrap
}

/// Whether this tool requires LLVM to run
pub fn uses_llvm_tools(&self) -> bool {
match self {
Expand Down Expand Up @@ -345,6 +341,7 @@ bootstrap_tool!(
Compiletest, "src/tools/compiletest", "compiletest", llvm_tools = true;
BuildManifest, "src/tools/build-manifest", "build-manifest";
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
RemoteTestServer, "src/tools/remote-test-server", "remote-test-server";
RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes";
);
Expand Down Expand Up @@ -397,40 +394,6 @@ impl Step for ErrorIndex {
}
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct RemoteTestServer {
pub compiler: Compiler,
pub target: Interned<String>,
}

impl Step for RemoteTestServer {
type Output = PathBuf;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/tools/remote-test-server")
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(RemoteTestServer {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
target: run.target,
});
}

fn run(self, builder: &Builder<'_>) -> PathBuf {
builder.ensure(ToolBuild {
compiler: self.compiler,
target: self.target,
tool: "remote-test-server",
mode: Mode::ToolStd,
path: "src/tools/remote-test-server",
is_optional_tool: false,
source_type: SourceType::InTree,
extra_features: Vec::new(),
}).expect("expected to build -- essential tool")
}
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Rustdoc {
/// This should only ever be 0 or 2.
Expand Down Expand Up @@ -659,23 +622,14 @@ impl<'a> Builder<'a> {
pub fn tool_cmd(&self, tool: Tool) -> Command {
let mut cmd = Command::new(self.tool_exe(tool));
let compiler = self.compiler(0, self.config.build);
self.prepare_tool_cmd(compiler, tool, &mut cmd);
cmd
}

/// Prepares the `cmd` provided to be able to run the `compiler` provided.
///
/// Notably this munges the dynamic library lookup path to point to the
/// right location to run `compiler`.
fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
let host = &compiler.host;
// Prepares the `cmd` provided to be able to run the `compiler` provided.
//
// Notably this munges the dynamic library lookup path to point to the
// right location to run `compiler`.
let mut lib_paths: Vec<PathBuf> = vec![
if compiler.stage == 0 {
self.build.rustc_snapshot_libdir()
} else {
PathBuf::from(&self.sysroot_libdir(compiler, compiler.host))
},
self.cargo_out(compiler, tool.get_mode(), *host).join("deps"),
self.build.rustc_snapshot_libdir(),
self.cargo_out(compiler, Mode::ToolBootstrap, *host).join("deps"),
];

// On MSVC a tool may invoke a C compiler (e.g., compiletest in run-make
Expand All @@ -696,6 +650,7 @@ impl<'a> Builder<'a> {
}
}

add_lib_path(lib_paths, cmd);
add_lib_path(lib_paths, &mut cmd);
cmd
}
}
50 changes: 25 additions & 25 deletions src/libcore/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,31 +111,31 @@ pub fn spin_loop() {
/// This function is a no-op, and does not even read from `dummy`.
#[inline]
#[unstable(feature = "test", issue = "27812")]
#[allow(unreachable_code)] // this makes #[cfg] a bit easier below.
pub fn black_box<T>(dummy: T) -> T {
cfg_if! {
if #[cfg(any(
target_arch = "asmjs",
all(
target_arch = "wasm32",
target_os = "emscripten"
)
))] {
#[inline]
unsafe fn black_box_impl<T>(d: T) -> T {
// these targets do not support inline assembly
let ret = crate::ptr::read_volatile(&d);
crate::mem::forget(d);
ret
}
} else {
#[inline]
unsafe fn black_box_impl<T>(d: T) -> T {
// we need to "use" the argument in some way LLVM can't
// introspect.
asm!("" : : "r"(&d));
d
}
}
// We need to "use" the argument in some way LLVM can't introspect, and on
// targets that support it we can typically leverage inline assembly to do
// this. LLVM's intepretation of inline assembly is that it's, well, a black
// box. This isn't the greatest implementation since it probably deoptimizes
// more than we want, but it's so far good enough.
#[cfg(not(any(
target_arch = "asmjs",
all(
target_arch = "wasm32",
target_os = "emscripten"
)
)))]
unsafe {
asm!("" : : "r"(&dummy));
return dummy;
}

// Not all platforms support inline assembly so try to do something without
// inline assembly which in theory still hinders at least some optimizations
// on those targets. This is the "best effort" scenario.
unsafe {
let ret = crate::ptr::read_volatile(&dummy);
crate::mem::forget(dummy);
ret
}
unsafe { black_box_impl(dummy) }
}
Loading