about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2019-02-07 12:08:05 +0100
committerAmanieu d'Antras <amanieu@gmail.com>2019-04-24 06:54:14 +0800
commit1fa7a21534bde7315bc78be970a342262ddf7a58 (patch)
treebfad0820f65e2fd60b1677520fe094371a8cf943
parent556fc40a95be2ea20e33ad34c32598cf2e3edf72 (diff)
downloadrust-1fa7a21534bde7315bc78be970a342262ddf7a58.tar.gz
rust-1fa7a21534bde7315bc78be970a342262ddf7a58.zip
Make libstd depend on the hashbrown crate
-rw-r--r--Cargo.lock19
-rw-r--r--Cargo.toml1
-rw-r--r--src/libstd/Cargo.toml1
-rw-r--r--src/tools/rustc-std-workspace-alloc/Cargo.toml14
-rw-r--r--src/tools/rustc-std-workspace-alloc/lib.rs9
5 files changed, 44 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index b62c7ff9097..6c5951f08da 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1067,6 +1067,16 @@ dependencies = [
 ]
 
 [[package]]
+name = "hashbrown"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "compiler_builtins 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-std-workspace-alloc 1.0.0",
+ "rustc-std-workspace-core 1.0.0",
+]
+
+[[package]]
 name = "heck"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2530,6 +2540,13 @@ version = "0.3.24"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
+name = "rustc-std-workspace-alloc"
+version = "1.0.0"
+dependencies = [
+ "alloc 0.0.0",
+]
+
+[[package]]
 name = "rustc-std-workspace-core"
 version = "1.0.0"
 dependencies = [
@@ -3260,6 +3277,7 @@ dependencies = [
  "core 0.0.0",
  "dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "fortanix-sgx-abi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "hashbrown 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
  "panic_abort 0.0.0",
  "panic_unwind 0.0.0",
@@ -4103,6 +4121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865"
 "checksum handlebars 0.32.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d89ec99d1594f285d4590fc32bac5f75cdab383f1123d504d27862c644a807dd"
 "checksum handlebars 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82e5750d8027a97b9640e3fefa66bbaf852a35228e1c90790efd13c4b09c166"
+"checksum hashbrown 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "58623735fa622916205f9e0a52a031b25b0e251ddaef47f7cb288444c4410beb"
 "checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82"
 "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
 "checksum home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "80dff82fb58cfbbc617fb9a9184b010be0529201553cda50ad04372bc2333aff"
diff --git a/Cargo.toml b/Cargo.toml
index cb3c0ee194f..ccd7e8b7654 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -67,6 +67,7 @@ rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
 # See comments in `tools/rustc-std-workspace-core/README.md` for what's going on
 # here
 rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' }
+rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' }
 
 [patch."https://github.com/rust-lang/rust-clippy"]
 clippy_lints = { path = "src/tools/clippy/clippy_lints" }
diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml
index 86ad334d886..83aee507f32 100644
--- a/src/libstd/Cargo.toml
+++ b/src/libstd/Cargo.toml
@@ -22,6 +22,7 @@ libc = { version = "0.2.51", default-features = false, features = ['rustc-dep-of
 compiler_builtins = { version = "0.1.9" }
 profiler_builtins = { path = "../libprofiler_builtins", optional = true }
 unwind = { path = "../libunwind" }
+hashbrown = { version = "0.2.0", features = ['rustc-dep-of-std'] }
 rustc-demangle = { version = "0.1.10", features = ['rustc-dep-of-std'] }
 backtrace-sys = { version = "0.1.24", features = ["rustc-dep-of-std"], optional = true }
 
diff --git a/src/tools/rustc-std-workspace-alloc/Cargo.toml b/src/tools/rustc-std-workspace-alloc/Cargo.toml
new file mode 100644
index 00000000000..98578914963
--- /dev/null
+++ b/src/tools/rustc-std-workspace-alloc/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "rustc-std-workspace-alloc"
+version = "1.0.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+license = 'MIT/Apache-2.0'
+description = """
+Hack for the compiler's own build system
+"""
+
+[lib]
+path = "lib.rs"
+
+[dependencies]
+alloc = { path = "../../liballoc" }
diff --git a/src/tools/rustc-std-workspace-alloc/lib.rs b/src/tools/rustc-std-workspace-alloc/lib.rs
new file mode 100644
index 00000000000..50294e6cbad
--- /dev/null
+++ b/src/tools/rustc-std-workspace-alloc/lib.rs
@@ -0,0 +1,9 @@
+#![feature(no_core, alloc)]
+#![no_core]
+
+// See rustc-std-workspace-core for why this crate is needed.
+
+// Rename the crate to avoid conflicting with the alloc module in liballoc.
+extern crate alloc as foo;
+
+pub use foo::*;