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 7 pull requests #66997

Merged
merged 31 commits into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cb08677
parse_enum_item -> parse_enum_variant
Centril Nov 30, 2019
ff5fcac
miri: add throw_machine_stop macro
RalfJung Dec 2, 2019
2304c25
Update the minimum external LLVM to 7
cuviper Dec 2, 2019
54b2060
Change linker for x86_64-fortanix-unknown-sgx to rust-lld
parthsane Dec 2, 2019
0be80f2
[const-prop] Fix ICE calculating enum discriminant
wesleywiser Nov 29, 2019
f3fb1c5
Update the `wasi` crate for `wasm32-wasi`
alexcrichton Nov 25, 2019
2ea1833
Use FxHash* from data structures not nodemap
Mark-Simulacrum Nov 12, 2019
b7cd58c
Decouple CguReuseTracker from Session
Mark-Simulacrum Nov 12, 2019
c761ec1
Introduce rustc_session crate
Mark-Simulacrum Nov 12, 2019
984c74a
Move cgu_reuse_tracker to librustc_session
Mark-Simulacrum Nov 12, 2019
4351698
Move duration_to_secs_str to rustc_session
Mark-Simulacrum Nov 12, 2019
433e546
Move Level to rustc_session
Mark-Simulacrum Nov 12, 2019
526ee51
Move Lint to rustc_session
Mark-Simulacrum Nov 12, 2019
f03d8f3
Move early lint declarations to librustc_session
Mark-Simulacrum Nov 12, 2019
285144a
Move NativeLibraryKind to rustc_session
Mark-Simulacrum Nov 14, 2019
72c67be
Re-export Client from rustc_data_structures::jobserver
Mark-Simulacrum Nov 20, 2019
f2a8aed
Directly use types from libsyntax::ast
Mark-Simulacrum Nov 20, 2019
e810b7e
Remove dead cfg method
Mark-Simulacrum Nov 29, 2019
2731075
Duplicate CrateConfig into Session
Mark-Simulacrum Nov 29, 2019
817d1ae
Move BufferedEarlyLint to librustc_session
Mark-Simulacrum Nov 29, 2019
52d4d47
Move ParseSess to librustc_session
Mark-Simulacrum Nov 29, 2019
cc2c33a
Move Session to librustc_session
Mark-Simulacrum Nov 29, 2019
42c4ae0
Deduplicate CrateConfig
Mark-Simulacrum Nov 29, 2019
68fb218
Fix UI tests for new locations
Mark-Simulacrum Dec 1, 2019
1b83dcf
Rollup merge of #66750 - alexcrichton:update-wasi, r=sfackler
Centril Dec 3, 2019
b6602d2
Rollup merge of #66878 - Mark-Simulacrum:sess-decouple, r=Centril
Centril Dec 3, 2019
d4b6235
Rollup merge of #66903 - Centril:parse-enum-variant, r=estebank
Centril Dec 3, 2019
71d1286
Rollup merge of #66951 - RalfJung:miri-machine-stop, r=oli-obk
Centril Dec 3, 2019
69f1323
Rollup merge of #66957 - parthsane:pvs/ftx_lld_linker, r=alexcrichton
Centril Dec 3, 2019
ded9885
Rollup merge of #66960 - wesleywiser:fix_66787_take2, r=oli-obk,RalfJung
Centril Dec 3, 2019
8dcb532
Rollup merge of #66973 - cuviper:min-llvm7, r=alexcrichton
Centril Dec 3, 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
31 changes: 29 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ checksum = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571"
dependencies = [
"cfg-if",
"libc",
"wasi",
"wasi 0.7.0",
]

[[package]]
Expand Down Expand Up @@ -3205,6 +3205,7 @@ dependencies = [
"rustc_fs_util",
"rustc_index",
"rustc_macros",
"rustc_session",
"rustc_target",
"scoped-tls",
"serialize",
Expand Down Expand Up @@ -3518,6 +3519,7 @@ dependencies = [
"rustc_fs_util",
"rustc_incremental",
"rustc_index",
"rustc_session",
"rustc_target",
"serialize",
"syntax",
Expand Down Expand Up @@ -3634,6 +3636,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_fs_util",
"rustc_session",
"serialize",
"syntax",
"syntax_pos",
Expand Down Expand Up @@ -3697,6 +3700,7 @@ dependencies = [
"rustc_error_codes",
"rustc_feature",
"rustc_index",
"rustc_session",
"rustc_target",
"syntax",
"syntax_pos",
Expand Down Expand Up @@ -3884,6 +3888,22 @@ dependencies = [
"syntax_pos",
]

[[package]]
name = "rustc_session"
version = "0.0.0"
dependencies = [
"log",
"num_cpus",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_fs_util",
"rustc_index",
"rustc_target",
"serialize",
"syntax_pos",
]

[[package]]
name = "rustc_target"
version = "0.0.0"
Expand Down Expand Up @@ -4301,7 +4321,7 @@ dependencies = [
"rustc_msan",
"rustc_tsan",
"unwind",
"wasi",
"wasi 0.9.0+wasi-snapshot-preview1",
]

[[package]]
Expand Down Expand Up @@ -4463,6 +4483,7 @@ dependencies = [
"rustc_index",
"rustc_lexer",
"rustc_macros",
"rustc_session",
"scoped-tls",
"serialize",
"smallvec 1.0.0",
Expand Down Expand Up @@ -5172,6 +5193,12 @@ name = "wasi"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"

[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
let mut parts = version.split('.').take(2)
.filter_map(|s| s.parse::<u32>().ok());
if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) {
if major >= 6 {
if major >= 7 {
return
}
}
panic!("\n\nbad LLVM version: {}, need >=6.0\n\n", version)
panic!("\n\nbad LLVM version: {}, need >=7.0\n\n", version)
}

fn configure_cmake(builder: &Builder<'_>,
Expand Down
2 changes: 1 addition & 1 deletion src/ci/azure-pipelines/auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0:
x86_64-gnu-llvm-7:
RUST_BACKTRACE: 1
dist-x86_64-linux: {}
dist-x86_64-linux-alt:
Expand Down
2 changes: 1 addition & 1 deletion src/ci/azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0: {}
x86_64-gnu-llvm-7: {}
mingw-check: {}
x86_64-gnu-tools:
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
Expand All @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
sudo \
gdb \
llvm-6.0-tools \
llvm-7-tools \
libedit-dev \
libssl-dev \
pkg-config \
Expand All @@ -24,7 +24,7 @@ RUN sh /scripts/sccache.sh
# using llvm-link-shared due to libffi issues -- see #34486
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--llvm-root=/usr/lib/llvm-6.0 \
--llvm-root=/usr/lib/llvm-7 \
--enable-llvm-link-shared
ENV SCRIPT python2.7 ../x.py test src/tools/tidy && python2.7 ../x.py test

Expand Down
1 change: 1 addition & 0 deletions src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ rustc_fs_util = { path = "../librustc_fs_util" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
measureme = "0.4"
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_session = { path = "../librustc_session" }
1 change: 0 additions & 1 deletion src/librustc/dep_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod prev;
mod query;
mod safe;
mod serialized;
pub mod cgu_reuse_tracker;

pub use self::dep_node::{DepNode, DepKind, DepConstructor, WorkProductId, RecoverKey, label_strs};
pub use self::graph::{DepGraph, WorkProduct, DepNodeIndex, DepNodeColor, TaskDeps, hash_result};
Expand Down
7 changes: 1 addition & 6 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#![recursion_limit="512"]

#[macro_use] extern crate bitflags;
extern crate getopts;
#[macro_use] extern crate scoped_tls;
#[cfg(windows)]
extern crate libc;
Expand All @@ -74,10 +73,6 @@ extern crate libc;
#[macro_use] extern crate syntax;
#[macro_use] extern crate smallvec;

// Use the test crate here so we depend on getopts through it. This allow tools to link to both
// librustc_driver and libtest.
extern crate test as _;

#[cfg(test)]
mod tests;

Expand Down Expand Up @@ -113,7 +108,7 @@ pub mod middle {
}

pub mod mir;
pub mod session;
pub use rustc_session as session;
pub mod traits;
pub mod ty;

Expand Down
31 changes: 4 additions & 27 deletions src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use syntax::ast;
use syntax::edition::Edition;
use syntax::source_map::Span;
use syntax::symbol::Symbol;
use syntax::early_buffered_lints::{ILL_FORMED_ATTRIBUTE_INPUT, META_VARIABLE_MISUSE};
use rustc_session::declare_lint;

declare_lint! {
pub EXCEEDING_BITSHIFTS,
Expand Down Expand Up @@ -404,31 +406,6 @@ declare_lint! {
};
}

/// Some lints that are buffered from `libsyntax`. See `syntax::early_buffered_lints`.
pub mod parser {
declare_lint! {
pub ILL_FORMED_ATTRIBUTE_INPUT,
Deny,
"ill-formed attribute inputs that were previously accepted and used in practice",
@future_incompatible = super::FutureIncompatibleInfo {
reference: "issue #57571 <https://github.com/rust-lang/rust/issues/57571>",
edition: None,
};
}

declare_lint! {
pub META_VARIABLE_MISUSE,
Allow,
"possible meta-variable misuse at macro definition"
}

declare_lint! {
pub INCOMPLETE_INCLUDE,
Deny,
"trailing content in included file"
}
}

declare_lint! {
pub DEPRECATED_IN_FUTURE,
Allow,
Expand Down Expand Up @@ -520,8 +497,8 @@ declare_lint_pass! {
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
MACRO_USE_EXTERN_CRATE,
MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS,
parser::ILL_FORMED_ATTRIBUTE_INPUT,
parser::META_VARIABLE_MISUSE,
ILL_FORMED_ATTRIBUTE_INPUT,
META_VARIABLE_MISUSE,
DEPRECATED_IN_FUTURE,
AMBIGUOUS_ASSOCIATED_ITEMS,
MUTABLE_BORROW_RESERVATION_CONFLICT,
Expand Down
1 change: 1 addition & 0 deletions src/librustc/lint/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use errors::Applicability;
use rustc_data_structures::fx::FxHashMap;
use syntax::ast::{Ident, Item, ItemKind};
use syntax::symbol::{sym, Symbol};
use rustc_session::declare_tool_lint;

declare_tool_lint! {
pub rustc::DEFAULT_HASH_TYPES,
Expand Down
20 changes: 2 additions & 18 deletions src/librustc/lint/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::lint::{self, Lint, LintId, Level, LintSource};
use crate::session::Session;
use crate::util::nodemap::FxHashMap;
use errors::{Applicability, DiagnosticBuilder};
use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use syntax::ast;
use syntax::attr;
use syntax::feature_gate;
Expand Down Expand Up @@ -93,7 +93,7 @@ impl LintLevelSets {

// If `level` is none then we actually assume the default level for this
// lint.
let mut level = level.unwrap_or_else(|| lint.default_level(sess));
let mut level = level.unwrap_or_else(|| lint.default_level(sess.edition()));

// If we're about to issue a warning, check at the last minute for any
// directives against the warnings "lint". If, for example, there's an
Expand Down Expand Up @@ -566,19 +566,3 @@ impl<'a> HashStable<StableHashingContext<'a>> for LintLevelMap {
})
}
}

impl<HCX> HashStable<HCX> for LintId {
#[inline]
fn hash_stable(&self, hcx: &mut HCX, hasher: &mut StableHasher) {
self.lint_name_raw().hash_stable(hcx, hasher);
}
}

impl<HCX> ToStableHashKey<HCX> for LintId {
type KeyType = &'static str;

#[inline]
fn to_stable_hash_key(&self, _: &HCX) -> &'static str {
self.lint_name_raw()
}
}
Loading