Skip to content

Commit 4c853ad

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents d9d8772 + c4cca3a commit 4c853ad

File tree

362 files changed

+7947
-4155
lines changed

Some content is hidden

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

362 files changed

+7947
-4155
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,6 @@ version.texi
103103
.cargo
104104
!src/vendor/**
105105
/src/target/
106+
107+
no_llvm_build
108+

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ For people new to Rust, and just starting to contribute, or even for
461461
more seasoned developers, some useful places to look for information
462462
are:
463463

464+
* [Rust Forge][rustforge] contains additional documentation, including write-ups of how to achieve common tasks
464465
* The [Rust Internals forum][rif], a place to ask questions and
465466
discuss Rust's internals
466467
* The [generated documentation for rust's compiler][gdfrustc]
@@ -476,6 +477,7 @@ are:
476477
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
477478
[rif]: http://internals.rust-lang.org
478479
[rr]: https://doc.rust-lang.org/book/README.html
480+
[rustforge]: https://forge.rust-lang.org/
479481
[tlgba]: http://tomlee.co/2014/04/a-more-detailed-tour-of-the-rust-compiler/
480482
[ro]: http://www.rustaceans.org/
481483
[rctd]: ./src/test/COMPILER_TESTS.md

src/Cargo.lock

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

src/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ members = [
3838
"tools/rls/test_data/infer_custom_bin",
3939
"tools/rls/test_data/infer_lib",
4040
"tools/rls/test_data/omit_init_build",
41+
"tools/rls/test_data/unicødë",
42+
"tools/rls/test_data/workspace_symbol",
4143
]
4244

4345
# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
@@ -60,10 +62,5 @@ debug-assertions = false
6062
[patch."https://github.com/rust-lang/cargo"]
6163
cargo = { path = "tools/cargo" }
6264

63-
# Override rustfmt dependencies both on the repo and the crate (the RLS
64-
# sometimes uses either).
65-
# FIXME should only need the crates.io patch, long term.
66-
[patch."https://github.com/rust-lang-nursery/rustfmt"]
67-
rustfmt-nightly = { path = "tools/rustfmt" }
6865
[patch.crates-io]
6966
rustfmt-nightly = { path = "tools/rustfmt" }

src/bootstrap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cmake = "0.1.23"
3434
filetime = "0.1"
3535
num_cpus = "1.0"
3636
getopts = "0.2"
37-
gcc = "0.3.54"
37+
cc = "1.0"
3838
libc = "0.2"
3939
serde = "1.0.8"
4040
serde_derive = "1.0.8"

src/bootstrap/bin/sccache-plus-cl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern crate gcc;
11+
extern crate cc;
1212

1313
use std::env;
1414
use std::process::{self, Command};
@@ -18,7 +18,7 @@ fn main() {
1818
// Locate the actual compiler that we're invoking
1919
env::remove_var("CC");
2020
env::remove_var("CXX");
21-
let mut cfg = gcc::Build::new();
21+
let mut cfg = cc::Build::new();
2222
cfg.cargo_metadata(false)
2323
.out_dir("/")
2424
.target(&target)

src/bootstrap/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ def bootstrap():
682682
try:
683683
with open(args.config or 'config.toml') as config:
684684
build.config_toml = config.read()
685-
except OSError:
685+
except (OSError, IOError):
686686
pass
687687

688688
if '\nverbose = 2' in build.config_toml:

src/bootstrap/builder.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl<'a> Builder<'a> {
306306
Subcommand::Bench { ref paths, .. } => (Kind::Bench, &paths[..]),
307307
Subcommand::Dist { ref paths } => (Kind::Dist, &paths[..]),
308308
Subcommand::Install { ref paths } => (Kind::Install, &paths[..]),
309-
Subcommand::Clean => panic!(),
309+
Subcommand::Clean { .. } => panic!(),
310310
};
311311

312312
let builder = Builder {
@@ -531,7 +531,10 @@ impl<'a> Builder<'a> {
531531
// For other crates, however, we know that we've already got a standard
532532
// library up and running, so we can use the normal compiler to compile
533533
// build scripts in that situation.
534-
if mode == Mode::Libstd {
534+
//
535+
// If LLVM support is disabled we need to use the snapshot compiler to compile
536+
// build scripts, as the new compiler doesnt support executables.
537+
if mode == Mode::Libstd || !self.build.config.llvm_enabled {
535538
cargo.env("RUSTC_SNAPSHOT", &self.initial_rustc)
536539
.env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_snapshot_libdir());
537540
} else {

src/bootstrap/cc.rs renamed to src/bootstrap/cc_detect.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//! 6. "cc"
2424
//!
2525
//! Some of this logic is implemented here, but much of it is farmed out to the
26-
//! `gcc` crate itself, so we end up having the same fallbacks as there.
26+
//! `cc` crate itself, so we end up having the same fallbacks as there.
2727
//! Similar logic is then used to find a C++ compiler, just some s/cc/c++/ is
2828
//! used.
2929
//!
@@ -35,7 +35,7 @@ use std::process::Command;
3535
use std::iter;
3636

3737
use build_helper::{cc2ar, output};
38-
use gcc;
38+
use cc;
3939

4040
use Build;
4141
use config::Target;
@@ -45,7 +45,7 @@ pub fn find(build: &mut Build) {
4545
// For all targets we're going to need a C compiler for building some shims
4646
// and such as well as for being a linker for Rust code.
4747
for target in build.targets.iter().chain(&build.hosts).cloned().chain(iter::once(build.build)) {
48-
let mut cfg = gcc::Build::new();
48+
let mut cfg = cc::Build::new();
4949
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false)
5050
.target(&target).host(&build.build);
5151

@@ -67,7 +67,7 @@ pub fn find(build: &mut Build) {
6767

6868
// For all host triples we need to find a C++ compiler as well
6969
for host in build.hosts.iter().cloned().chain(iter::once(build.build)) {
70-
let mut cfg = gcc::Build::new();
70+
let mut cfg = cc::Build::new();
7171
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false).cpp(true)
7272
.target(&host).host(&build.build);
7373
let config = build.config.target_config.get(&host);
@@ -82,7 +82,7 @@ pub fn find(build: &mut Build) {
8282
}
8383
}
8484

85-
fn set_compiler(cfg: &mut gcc::Build,
85+
fn set_compiler(cfg: &mut cc::Build,
8686
gnu_compiler: &str,
8787
target: Interned<String>,
8888
config: Option<&Target>,

src/bootstrap/check.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,11 @@ impl Step for Rls {
254254

255255
builder.add_rustc_lib_path(compiler, &mut cargo);
256256

257-
try_run(build, &mut cargo);
257+
try_run_expecting(
258+
build,
259+
&mut cargo,
260+
builder.build.config.toolstate.rls.passes(ToolState::Testing),
261+
);
258262
}
259263
}
260264

@@ -295,7 +299,11 @@ impl Step for Rustfmt {
295299

296300
builder.add_rustc_lib_path(compiler, &mut cargo);
297301

298-
try_run(build, &mut cargo);
302+
try_run_expecting(
303+
build,
304+
&mut cargo,
305+
builder.build.config.toolstate.rustfmt.passes(ToolState::Testing),
306+
);
299307
}
300308
}
301309

0 commit comments

Comments
 (0)