diff --git a/src/Cargo.lock b/src/Cargo.lock index d4544ffa3244f..9a3467e762215 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -1,3 +1,17 @@ +[[package]] +name = "addr2line" +version = "0.6.0" +source = "git+https://github.com/est31/addr2line?branch=no_std_prototype#19fca3a5af2f4814444f07ca8199080d2f94a38d" +dependencies = [ + "cpp_demangle 0.2.9 (git+https://github.com/gimli-rs/cpp_demangle?rev=6d5320d2f5c119923647b6d7d2a7d563717a4ddf)", + "fallible-iterator 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "gimli 0.16.0 (git+https://github.com/est31/gimli?rev=304caacf8b73f117813b1a0d436ce24403459bf2)", + "intervaltree 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "object 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "aho-corasick" version = "0.6.4" @@ -21,8 +35,6 @@ version = "0.0.0" dependencies = [ "build_helper 0.1.0", "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.0.0", - "core 0.0.0", "libc 0.0.0", ] @@ -30,8 +42,6 @@ dependencies = [ name = "alloc_system" version = "0.0.0" dependencies = [ - "compiler_builtins 0.0.0", - "core 0.0.0", "dlmalloc 0.0.0", "libc 0.0.0", ] @@ -470,6 +480,14 @@ name = "core-foundation-sys" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cpp_demangle" +version = "0.2.9" +source = "git+https://github.com/gimli-rs/cpp_demangle?rev=6d5320d2f5c119923647b6d7d2a7d563717a4ddf#6d5320d2f5c119923647b6d7d2a7d563717a4ddf" +dependencies = [ + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crates-io" version = "0.17.0" @@ -598,10 +616,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "dlmalloc" version = "0.0.0" -dependencies = [ - "compiler_builtins 0.0.0", - "core 0.0.0", -] [[package]] name = "dtoa" @@ -699,6 +713,11 @@ dependencies = [ "synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fallible-iterator" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "features" version = "0.1.0" @@ -809,6 +828,17 @@ name = "getopts" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "gimli" +version = "0.16.0" +source = "git+https://github.com/est31/gimli?rev=304caacf8b73f117813b1a0d436ce24403459bf2#304caacf8b73f117813b1a0d436ce24403459bf2" +dependencies = [ + "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fallible-iterator 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait 1.0.0 (git+https://github.com/kevinaboos/stable_deref_trait?rev=8aa58b57a20b0dc215084f84de81e0f7e7dea76e)", +] + [[package]] name = "git2" version = "0.7.1" @@ -851,6 +881,16 @@ dependencies = [ "regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "goblin" +version = "0.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "graphviz" version = "0.0.0" @@ -964,6 +1004,14 @@ dependencies = [ "xz2 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "intervaltree" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "smallvec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "is-match" version = "0.1.0" @@ -1057,13 +1105,14 @@ name = "lazycell" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazycell" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.0.0" -dependencies = [ - "compiler_builtins 0.0.0", - "core 0.0.0", -] [[package]] name = "libc" @@ -1300,6 +1349,16 @@ dependencies = [ "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "object" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "goblin 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "open" version = "1.2.1" @@ -1350,8 +1409,6 @@ dependencies = [ name = "panic_abort" version = "0.0.0" dependencies = [ - "compiler_builtins 0.0.0", - "core 0.0.0", "libc 0.0.0", ] @@ -1359,9 +1416,6 @@ dependencies = [ name = "panic_unwind" version = "0.0.0" dependencies = [ - "alloc 0.0.0", - "compiler_builtins 0.0.0", - "core 0.0.0", "libc 0.0.0", "unwind 0.0.0", ] @@ -1454,6 +1508,11 @@ name = "pkg-config" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "polonius-engine" version = "0.5.0" @@ -1486,6 +1545,14 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc_macro" version = "0.0.0" @@ -1501,8 +1568,6 @@ name = "profiler_builtins" version = "0.0.0" dependencies = [ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.0.0", - "core 0.0.0", ] [[package]] @@ -1537,6 +1602,14 @@ dependencies = [ "proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "quote" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "racer" version = "2.0.14" @@ -2054,12 +2127,9 @@ dependencies = [ name = "rustc_asan" version = "0.0.0" dependencies = [ - "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", "cmake 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.0.0", - "core 0.0.0", ] [[package]] @@ -2080,30 +2150,10 @@ dependencies = [ name = "rustc_codegen_llvm" version = "0.0.0" dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc 0.0.0", "rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_allocator 0.0.0", - "rustc_apfloat 0.0.0", - "rustc_codegen_utils 0.0.0", - "rustc_data_structures 0.0.0", - "rustc_errors 0.0.0", - "rustc_incremental 0.0.0", "rustc_llvm 0.0.0", - "rustc_mir 0.0.0", - "rustc_platform_intrinsics 0.0.0", - "rustc_target 0.0.0", - "serialize 0.0.0", - "syntax 0.0.0", - "syntax_pos 0.0.0", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2224,23 +2274,17 @@ dependencies = [ name = "rustc_llvm" version = "0.0.0" dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "build_helper 0.1.0", "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_cratesio_shim 0.0.0", ] [[package]] name = "rustc_lsan" version = "0.0.0" dependencies = [ - "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", "cmake 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.0.0", - "core 0.0.0", ] [[package]] @@ -2286,12 +2330,9 @@ dependencies = [ name = "rustc_msan" version = "0.0.0" dependencies = [ - "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", "cmake 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.0.0", - "core 0.0.0", ] [[package]] @@ -2390,12 +2431,9 @@ dependencies = [ name = "rustc_tsan" version = "0.0.0" dependencies = [ - "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", "cmake 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.0.0", - "core 0.0.0", ] [[package]] @@ -2531,6 +2569,24 @@ name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scroll" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scroll_derive 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "scroll_derive" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "semver" version = "0.9.0" @@ -2608,6 +2664,11 @@ name = "siphasher" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "smallvec" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "smallvec" version = "0.6.0" @@ -2623,6 +2684,11 @@ dependencies = [ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "stable_deref_trait" +version = "1.0.0" +source = "git+https://github.com/kevinaboos/stable_deref_trait?rev=8aa58b57a20b0dc215084f84de81e0f7e7dea76e#8aa58b57a20b0dc215084f84de81e0f7e7dea76e" + [[package]] name = "stable_deref_trait" version = "1.0.0" @@ -2632,14 +2698,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "std" version = "0.0.0" dependencies = [ - "alloc 0.0.0", + "addr2line 0.6.0 (git+https://github.com/est31/addr2line?branch=no_std_prototype)", "alloc_jemalloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "compiler_builtins 0.0.0", - "core 0.0.0", + "gimli 0.16.0 (git+https://github.com/est31/gimli?rev=304caacf8b73f117813b1a0d436ce24403459bf2)", "libc 0.0.0", + "object 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "panic_abort 0.0.0", "panic_unwind 0.0.0", "profiler_builtins 0.0.0", @@ -2648,7 +2714,6 @@ dependencies = [ "rustc_lsan 0.0.0", "rustc_msan 0.0.0", "rustc_tsan 0.0.0", - "std_unicode 0.0.0", "unwind 0.0.0", ] @@ -2729,6 +2794,16 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "synom" version = "0.11.3" @@ -3037,8 +3112,6 @@ dependencies = [ name = "unwind" version = "0.0.0" dependencies = [ - "compiler_builtins 0.0.0", - "core 0.0.0", "libc 0.0.0", ] @@ -3080,6 +3153,14 @@ name = "utf8-ranges" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "uuid" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "vcpkg" version = "0.2.3" @@ -3167,6 +3248,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] +"checksum addr2line 0.6.0 (git+https://github.com/est31/addr2line?branch=no_std_prototype)" = "" "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" "checksum ammonia 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd4c682378117e4186a492b2252b9537990e1617f44aed9788b9a1149de45477" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" @@ -3196,6 +3278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum compiletest_rs 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "608d9d3ccc45b63bf337d2ff5e65def5a5a52c187122232509f6b72707f61b1b" "checksum core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7caa6cb9e76ddddbea09a03266d6b3bc98cd41e9fb9b017c473e7cca593ec25" "checksum core-foundation-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b2a53cce0ddcf7e7e1f998738d757d5a3bf08bf799a180e50ebe50d298f52f5a" +"checksum cpp_demangle 0.2.9 (git+https://github.com/gimli-rs/cpp_demangle?rev=6d5320d2f5c119923647b6d7d2a7d563717a4ddf)" = "" "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" @@ -3219,6 +3302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82" "checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b" +"checksum fallible-iterator 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6034a9c9dfce417c7710128d202eef406878cd2fe294e76e2ee05259c9b042d" "checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" "checksum filetime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08530a39af0bd442c40aabb9e854f442a83bd2403feb1ed58fbe982dec2385f3" "checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" @@ -3232,10 +3316,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3" "checksum futures 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5a3176836efa0b37f0e321b86672dfada1564aeb516fbed67b7c24050a0263" "checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" +"checksum gimli 0.16.0 (git+https://github.com/est31/gimli?rev=304caacf8b73f117813b1a0d436ce24403459bf2)" = "" "checksum git2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f41c0035c37ec11ed3f1e1946a76070b0c740393687e9a9c7612f6a709036b3" "checksum git2-curl 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b502f6b1b467957403d168f0039e0c46fa6a1220efa2adaef25d5b267b5fe024" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum globset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1e96ab92362c06811385ae9a34d2698e8a1160745e0c78fbb434a44c8de3fabc" +"checksum goblin 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e3ba9fec4dc9a09553388bff2724d3bf06bd64013539f2d3e1e3838eefb310a" "checksum handlebars 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07af2ff31f66f39a5c8b8b8a5dc02734a453110146763e3a2323f4931a915a76" "checksum hex 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "459d3cf58137bb02ad4adeef5036377ff59f066dbb82517b7192e3a5462a2abc" "checksum home 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f94f6fbdc000a6eba0c8cf08632b2091bb59141d36ac321a2a96d6365e5e4dc" @@ -3244,6 +3330,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" "checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8" "checksum ignore 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "245bea0ba52531a3739cb8ba99f8689eda13d7faf8c36b6a73ce4421aab42588" +"checksum intervaltree 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "586949c609276837d70c776c30afa5bbd374c55fe69b4e10261c6f595dc7b31a" "checksum is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5b386aef33a1c677be65237cb9d32c3f3ef56bd035949710c4bb13083eb053" "checksum isatty 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6c324313540cd4d7ba008d43dc6606a32a5579f13cc17b2804c13096f0a5c522" "checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" @@ -3256,6 +3343,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" +"checksum lazycell 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d33a48d0365c96081958cc663eef834975cb1e8d8bea3378513fc72bdbf11e50" "checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" "checksum libgit2-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1ecbd6428006c321c29b6c8a895f0d90152f1cf4fd8faab69fc436a3d9594f63" "checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75" @@ -3280,6 +3368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum object 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d516d9e7232a46e709ab9027f51e2d3ce97608bce167df6badf12b258a6a61b" "checksum open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c281318d992e4432cfa799969467003d05921582a7489a8325e37f8a450d5113" "checksum openssl 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)" = "63246f69962e8d5ef865f82a65241d6483c8a2905a1801e2f7feb5d187d51320" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" @@ -3297,15 +3386,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" "checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" +"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" "checksum polonius-engine 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b6b0a7f5f4278b991ffd14abce1d01b013121ad297460237ef0a2f08d43201" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6" "checksum proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "49b6a521dc81b643e9a51e0d1cf05df46d5a2f3c0280ea72bcb68276ba64a118" +"checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6" "checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" "checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4" "checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0ff51282f28dc1b53fd154298feaa2e77c5ea0dba68e1fd8b03b72fbe13d2a" +"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035" "checksum racer 2.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "e713729f45f12df5c5e182d39506766f76c09133fb661d3622e0ddf8078911c2" "checksum radix_trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "03d0d770481e8af620ca61d3d304bf014f965d7f78e923dc58545e6a545070a9" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" @@ -3353,6 +3445,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "85fd9df495640643ad2d00443b3d78aae69802ad488debab4f1dd52fc1806ade" "checksum scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8674d439c964889e2476f474a3bf198cc9e199e77499960893bac5de7e9218a4" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum scroll 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66f024a8cc5e456eb870f688dbd899c84f61190c82c7a911e40f926941969074" +"checksum scroll_derive 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f9a353f5dd99e42ff097d5a61db3257aa2c7127d76a3fa8287b642ef9ae0f7c5" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "29465552c9b767d0cb44be3ddf4c3214be15d34975a7750f6cf4f409835f0248" @@ -3363,8 +3457,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum shell-escape 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "170a13e64f2a51b77a45702ba77287f5c6829375b04a69cf2222acd17d0cfab9" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" +"checksum smallvec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ee4f357e8cd37bf8822e1b964e96fd39e2cb5a0424f8aaa284ccaccc2162411c" "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9" "checksum socket2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ff606e0486e88f5fc6cfeb3966e434fb409abbc7a3ab495238f70a1ca97f789d" +"checksum stable_deref_trait 1.0.0 (git+https://github.com/kevinaboos/stable_deref_trait?rev=8aa58b57a20b0dc215084f84de81e0f7e7dea76e)" = "" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39cb4173bcbd1319da31faa5468a7e3870683d7a237150b0b0aaafd546f6ad12" "checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7" @@ -3374,6 +3470,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum strum_macros 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0dd9bd569e88028750e3ae5c25616b8278ac16a8e61aba4339195c72396d49e1" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "91b52877572087400e83d24b9178488541e3d535259e04ff17a63df1e5ceff59" +"checksum syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c67da57e61ebc7b7b6fff56bb34440ca3a83db037320b0507af4c10368deda7d" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" "checksum syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9e52bffe6202cfb67587784cf23e0ec5bf26d331eef4922a16d5c42e12aa1e9b" @@ -3407,6 +3504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum userenv-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d28ea36bbd9192d75bd9fa9b39f96ddb986eaee824adae5d53b6e51919b2f3" "checksum utf-8 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1262dfab4c30d5cb7c07026be00ee343a6cf5027fdc0104a9160f354e5db75c" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" +"checksum uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363" "checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380" "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" diff --git a/src/Cargo.toml b/src/Cargo.toml index 8ce4c97601bab..c43ff9c19a2ab 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -1,6 +1,9 @@ [workspace] members = [ "bootstrap", + "libcore", + "libstd_unicode", + "liballoc", "rustc", "libstd", "libtest", diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index d482a0d565027..7a2aaa7e88469 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -729,7 +729,7 @@ impl<'a> Builder<'a> { } else { &self.config.channel }; - cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata); + cargo.env("__CARGO_DEFAULT_LIB_METADATA", &format!("{}-{}", metadata, mode.as_str())); let stage; if compiler.stage == 0 && self.local_rebuild { @@ -838,7 +838,14 @@ impl<'a> Builder<'a> { // already-passed -C metadata flag with our own. Our rustc.rs // wrapper around the actual rustc will detect -C metadata being // passed and frob it with this extra string we're passing in. - cargo.env("RUSTC_METADATA_SUFFIX", "rustc"); + let suffix = match mode { + Mode::Std => "rustc-std", + Mode::Test => "rustc-test", + Mode::Codegen => "rustc-codegen", + Mode::Rustc => "rustc-rustc", + Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => "rustc-tools", + }; + cargo.env("RUSTC_METADATA_SUFFIX", suffix); } if let Some(x) = self.crt_static(target) { diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index b3ccb3cc3c926..5fe8443d7ea86 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -10,7 +10,8 @@ //! Implementation of compiling the compiler and standard library, in "check" mode. -use compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, rustc_cargo_env, add_to_sysroot}; +use compile::{run_cargo, core_cargo, std_cargo, test_cargo, + rustc_cargo, rustc_cargo_env, add_to_sysroot}; use builder::{RunConfig, Builder, ShouldRun, Step}; use tool::{self, prepare_tool_cargo}; use {Compiler, Mode}; @@ -43,17 +44,25 @@ impl Step for Std { let out_dir = builder.stage_out(compiler, Mode::Std); builder.clear_if_dirty(&out_dir, &builder.rustc(compiler)); - let mut cargo = builder.cargo(compiler, Mode::Std, target, "check"); - std_cargo(builder, &compiler, target, &mut cargo); + let mut core_cargo_invoc = builder.cargo(compiler, Mode::Std, target, "check"); + core_cargo(builder, &compiler, target, &mut core_cargo_invoc); + let mut std_cargo_invoc = builder.cargo(compiler, Mode::Std, target, "check"); + std_cargo(builder, &compiler, target, &mut std_cargo_invoc); let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage)); + let libdir = builder.sysroot_libdir(compiler, target); + println!("Checking std artifacts ({} -> {})", &compiler.host, target); run_cargo(builder, - &mut cargo, + &mut core_cargo_invoc, + &libcore_stamp(builder, compiler, target), + true); + add_to_sysroot(&builder, &libdir, &libcore_stamp(builder, compiler, target)); + run_cargo(builder, + &mut std_cargo_invoc, &libstd_stamp(builder, compiler, target), true); - let libdir = builder.sysroot_libdir(compiler, target); add_to_sysroot(&builder, &libdir, &libstd_stamp(builder, compiler, target)); } } @@ -88,6 +97,7 @@ impl Step for Rustc { let target = self.target; let stage_out = builder.stage_out(compiler, Mode::Rustc); + builder.clear_if_dirty(&stage_out, &libcore_stamp(builder, compiler, target)); builder.clear_if_dirty(&stage_out, &libstd_stamp(builder, compiler, target)); builder.clear_if_dirty(&stage_out, &libtest_stamp(builder, compiler, target)); @@ -176,6 +186,7 @@ impl Step for Test { let target = self.target; let out_dir = builder.stage_out(compiler, Mode::Test); + builder.clear_if_dirty(&out_dir, &libcore_stamp(builder, compiler, target)); builder.clear_if_dirty(&out_dir, &libstd_stamp(builder, compiler, target)); let mut cargo = builder.cargo(compiler, Mode::Test, target, "check"); @@ -242,6 +253,12 @@ impl Step for Rustdoc { } } +/// Cargo's output path for the core library in a given stage, compiled +/// by a particular compiler for the specified target. +pub fn libcore_stamp(builder: &Builder, compiler: Compiler, target: Interned) -> PathBuf { + builder.cargo_out(compiler, Mode::Std, target).join(".libcore-check.stamp") +} + /// Cargo's output path for the standard library in a given stage, compiled /// by a particular compiler for the specified target. pub fn libstd_stamp(builder: &Builder, compiler: Compiler, target: Interned) -> PathBuf { diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 11d9154ba696c..4e5249343f25e 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -85,6 +85,12 @@ impl Step for Std { copy_musl_third_party_objects(builder, target, &libdir); } + builder.ensure(CoreLink { + compiler: from, + target_compiler: compiler, + target, + }); + builder.ensure(StdLink { compiler: from, target_compiler: compiler, @@ -100,22 +106,45 @@ impl Step for Std { let out_dir = builder.cargo_out(compiler, Mode::Std, target); builder.clear_if_dirty(&out_dir, &builder.rustc(compiler)); - let mut cargo = builder.cargo(compiler, Mode::Std, target, "build"); - std_cargo(builder, &compiler, target, &mut cargo); + let mut core_cargo_invoc = builder.cargo(compiler, Mode::Std, target, "build"); + core_cargo(builder, &compiler, target, &mut core_cargo_invoc); + let std_cargo_invoc = if builder.no_std(target) != Some(true) { + let mut std_cargo_invoc = builder.cargo(compiler, Mode::Std, target, "build"); + std_cargo(builder, &compiler, target, &mut std_cargo_invoc); + Some(std_cargo_invoc) + } else { + None + }; let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage)); builder.info(&format!("Building stage{} std artifacts ({} -> {})", compiler.stage, &compiler.host, target)); run_cargo(builder, - &mut cargo, - &libstd_stamp(builder, compiler, target), + &mut core_cargo_invoc, + &libcore_stamp(builder, compiler, target), false); - - builder.ensure(StdLink { + builder.ensure(CoreLink { compiler: builder.compiler(compiler.stage, builder.config.build), target_compiler: compiler, target, }); + if let Some(mut std_cargo_invoc) = std_cargo_invoc { + run_cargo(builder, + &mut std_cargo_invoc, + &libstd_stamp(builder, compiler, target), + false); + builder.ensure(StdLink { + compiler: builder.compiler(compiler.stage, builder.config.build), + target_compiler: compiler, + target, + }); + } + + builder.ensure(tool::CleanTools { + compiler, + target, + cause: Mode::Std, + }); } } @@ -133,68 +162,116 @@ fn copy_musl_third_party_objects(builder: &Builder, } } +fn mac_os_deployment_env_var(cargo: &mut Command) { + if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") { + cargo.env("MACOSX_DEPLOYMENT_TARGET", target); + } +} + +/// Configure cargo to compile a few no_std crates like core, +/// adding appropriate env vars and such. +pub fn core_cargo(builder: &Builder, + _compiler: &Compiler, + _target: Interned, + cargo: &mut Command) { + mac_os_deployment_env_var(cargo); + + // for no-std targets we only compile a few no_std crates + cargo.arg("--features").arg("c mem") + .args(&["-p", "alloc"]) + .args(&["-p", "compiler_builtins"]) + .args(&["-p", "std_unicode"]) + .arg("--manifest-path") + .arg(builder.src.join("src/rustc/compiler_builtins_shim/Cargo.toml")); +} + /// Configure cargo to compile the standard library, adding appropriate env vars /// and such. pub fn std_cargo(builder: &Builder, compiler: &Compiler, target: Interned, cargo: &mut Command) { - if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") { - cargo.env("MACOSX_DEPLOYMENT_TARGET", target); - } + mac_os_deployment_env_var(cargo); - if builder.no_std(target) == Some(true) { - // for no-std targets we only compile a few no_std crates - cargo.arg("--features").arg("c mem") - .args(&["-p", "alloc"]) - .args(&["-p", "compiler_builtins"]) - .args(&["-p", "std_unicode"]) - .arg("--manifest-path") - .arg(builder.src.join("src/rustc/compiler_builtins_shim/Cargo.toml")); - } else { - let mut features = builder.std_features(); - - // When doing a local rebuild we tell cargo that we're stage1 rather than - // stage0. This works fine if the local rust and being-built rust have the - // same view of what the default allocator is, but fails otherwise. Since - // we don't have a way to express an allocator preference yet, work - // around the issue in the case of a local rebuild with jemalloc disabled. - if compiler.stage == 0 && builder.local_rebuild && !builder.config.use_jemalloc { - features.push_str(" force_alloc_system"); - } + let mut features = builder.std_features(); - if compiler.stage != 0 && builder.config.sanitizers { - // This variable is used by the sanitizer runtime crates, e.g. - // rustc_lsan, to build the sanitizer runtime from C code - // When this variable is missing, those crates won't compile the C code, - // so we don't set this variable during stage0 where llvm-config is - // missing - // We also only build the runtimes when --enable-sanitizers (or its - // config.toml equivalent) is used - let llvm_config = builder.ensure(native::Llvm { - target: builder.config.build, - emscripten: false, - }); - cargo.env("LLVM_CONFIG", llvm_config); - } + // When doing a local rebuild we tell cargo that we're stage1 rather than + // stage0. This works fine if the local rust and being-built rust have the + // same view of what the default allocator is, but fails otherwise. Since + // we don't have a way to express an allocator preference yet, work + // around the issue in the case of a local rebuild with jemalloc disabled. + if compiler.stage == 0 && builder.local_rebuild && !builder.config.use_jemalloc { + features.push_str(" force_alloc_system"); + } - cargo.arg("--features").arg(features) - .arg("--manifest-path") - .arg(builder.src.join("src/libstd/Cargo.toml")); + if compiler.stage != 0 && builder.config.sanitizers { + // This variable is used by the sanitizer runtime crates, e.g. + // rustc_lsan, to build the sanitizer runtime from C code + // When this variable is missing, those crates won't compile the C code, + // so we don't set this variable during stage0 where llvm-config is + // missing + // We also only build the runtimes when --enable-sanitizers (or its + // config.toml equivalent) is used + let llvm_config = builder.ensure(native::Llvm { + target: builder.config.build, + emscripten: false, + }); + cargo.env("LLVM_CONFIG", llvm_config); + } - if let Some(target) = builder.config.target_config.get(&target) { - if let Some(ref jemalloc) = target.jemalloc { - cargo.env("JEMALLOC_OVERRIDE", jemalloc); - } + cargo.arg("--features").arg(features) + .arg("--manifest-path") + .arg(builder.src.join("src/libstd/Cargo.toml")); + + if let Some(target) = builder.config.target_config.get(&target) { + if let Some(ref jemalloc) = target.jemalloc { + cargo.env("JEMALLOC_OVERRIDE", jemalloc); } - if target.contains("musl") { - if let Some(p) = builder.musl_root(target) { - cargo.env("MUSL_ROOT", p); - } + } + if target.contains("musl") { + if let Some(p) = builder.musl_root(target) { + cargo.env("MUSL_ROOT", p); } } } +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +struct CoreLink { + pub compiler: Compiler, + pub target_compiler: Compiler, + pub target: Interned, +} + +impl Step for CoreLink { + type Output = (); + + fn should_run(run: ShouldRun) -> ShouldRun { + run.never() + } + + /// Link all libcore rlibs/dylibs into the sysroot location. + /// + /// Links those artifacts generated by `compiler` to a the `stage` compiler's + /// sysroot for the specified `host` and `target`. + /// + /// Note that this assumes that `compiler` has already generated the + /// libraries for `target`, and this method will find them in the relevant + /// output directory. + fn run(self, builder: &Builder) { + let compiler = self.compiler; + let target_compiler = self.target_compiler; + let target = self.target; + builder.info(&format!("Copying stage{} core from stage{} ({} -> {} / {})", + target_compiler.stage, + compiler.stage, + &compiler.host, + target_compiler.host, + target)); + let libdir = builder.sysroot_libdir(target_compiler, target); + add_to_sysroot(builder, &libdir, &libcore_stamp(builder, compiler, target)); + } +} + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] struct StdLink { pub compiler: Compiler, @@ -236,12 +313,6 @@ impl Step for StdLink { // for reason why the sanitizers are not built in stage0. copy_apple_sanitizer_dylibs(builder, &builder.native_dir(target), "osx", &libdir); } - - builder.ensure(tool::CleanTools { - compiler: target_compiler, - target, - cause: Mode::Std, - }); } } @@ -369,6 +440,7 @@ impl Step for Test { } let out_dir = builder.cargo_out(compiler, Mode::Test, target); + builder.clear_if_dirty(&out_dir, &libcore_stamp(builder, compiler, target)); builder.clear_if_dirty(&out_dir, &libstd_stamp(builder, compiler, target)); let mut cargo = builder.cargo(compiler, Mode::Test, target, "build"); test_cargo(builder, &compiler, target, &mut cargo); @@ -394,9 +466,7 @@ pub fn test_cargo(builder: &Builder, _compiler: &Compiler, _target: Interned, cargo: &mut Command) { - if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") { - cargo.env("MACOSX_DEPLOYMENT_TARGET", target); - } + mac_os_deployment_env_var(cargo); cargo.arg("--manifest-path") .arg(builder.src.join("src/libtest/Cargo.toml")); } @@ -490,6 +560,7 @@ impl Step for Rustc { target: builder.config.build, }); let cargo_out = builder.cargo_out(compiler, Mode::Rustc, target); + builder.clear_if_dirty(&cargo_out, &libcore_stamp(builder, compiler, target)); builder.clear_if_dirty(&cargo_out, &libstd_stamp(builder, compiler, target)); builder.clear_if_dirty(&cargo_out, &libtest_stamp(builder, compiler, target)); @@ -653,7 +724,7 @@ impl Step for CodegenBackend { if builder.config.dry_run { return; } - let mut files = files.into_iter() + let mut files = files.iter() .filter(|f| { let filename = f.file_name().unwrap().to_str().unwrap(); is_dylib(filename) && filename.contains("rustc_codegen_llvm-") @@ -790,6 +861,12 @@ fn copy_lld_to_sysroot(builder: &Builder, builder.copy(&lld_install_root.join("bin").join(&exe), &dst.join(&exe)); } +/// Cargo's output path for libcore in a given stage, compiled +/// by a particular compiler for the specified target. +pub fn libcore_stamp(builder: &Builder, compiler: Compiler, target: Interned) -> PathBuf { + builder.cargo_out(compiler, Mode::Std, target).join(".libcore.stamp") +} + /// Cargo's output path for the standard library in a given stage, compiled /// by a particular compiler for the specified target. pub fn libstd_stamp(builder: &Builder, compiler: Compiler, target: Interned) -> PathBuf { @@ -921,6 +998,7 @@ impl Step for Assemble { for stage in 0..min(target_compiler.stage, builder.config.keep_stage.unwrap()) { let target_compiler = builder.compiler(stage, target_compiler.host); let target = target_compiler.host; + builder.ensure(CoreLink { compiler, target_compiler, target }); builder.ensure(StdLink { compiler, target_compiler, target }); builder.ensure(TestLink { compiler, target_compiler, target }); builder.ensure(RustcLink { compiler, target_compiler, target }); @@ -1043,28 +1121,28 @@ pub fn run_cargo(builder: &Builder, cargo: &mut Command, stamp: &Path, is_check: CargoMessage::CompilerArtifact { filenames, .. } => filenames, _ => return, }; - for filename in filenames { + for filename in filenames.iter() { // Skip files like executables if !filename.ends_with(".rlib") && !filename.ends_with(".lib") && !is_dylib(&filename) && !(is_check && filename.ends_with(".rmeta")) { - return; + break; } - let filename = Path::new(&*filename); + let filename = Path::new(&**filename); // If this was an output file in the "host dir" we don't actually // worry about it, it's not relevant for us. if filename.starts_with(&host_root_dir) { - return; + break; } // If this was output in the `deps` dir then this is a precise file // name (hash included) so we start tracking it. if filename.starts_with(&target_deps_dir) { deps.push(filename.to_path_buf()); - return; + break; } // Otherwise this was a "top level artifact" which right now doesn't @@ -1085,6 +1163,33 @@ pub fn run_cargo(builder: &Builder, cargo: &mut Command, stamp: &Path, is_check: toplevel.push((file_stem, extension, expected_len)); } + for filename in filenames { + // Skip files like executables + if !filename.ends_with(".rlib") && + !filename.ends_with(".lib") && + !is_dylib(&filename) && + !(is_check && filename.ends_with(".rmeta")) { + break; + } + + let filename = Path::new(&*filename); + + // If this was an output file in the "host dir" we don't actually + // worry about it, it's not relevant for us. + if filename.starts_with(&host_root_dir) { + let f = filename.file_name(); + if deps.iter().find(|v| v.file_name() == f).is_none() { + deps.push(filename.to_path_buf()); + } + continue; + } + + // If this was output in the `deps` dir then this is a precise file + // name (hash included) so we start tracking it. + if filename.starts_with(&target_deps_dir) { + break; + } + } }); if !ok { diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 6e77413f06188..8be42032f55e9 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -332,6 +332,18 @@ impl Mode { _ => false } } + + pub fn as_str(&self) -> &'static str { + match self { + Mode::Std => "std", + Mode::Test => "test", + Mode::Rustc => "rustc", + Mode::Codegen => "codegen", + Mode::ToolStd => "tool", + Mode::ToolTest => "tool", + Mode::ToolRustc => "tool", + } + } } impl Build { @@ -534,8 +546,8 @@ impl Build { let suffix = match mode { Mode::Std => "-std", Mode::Test => "-test", - Mode::Codegen => "-rustc", Mode::Rustc => "-rustc", + Mode::Codegen => "-codegen", Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => "-tools", }; self.out.join(&*compiler.host) diff --git a/src/liballoc_jemalloc/Cargo.toml b/src/liballoc_jemalloc/Cargo.toml index 7986d5dd2eb54..8f52cbb2ea400 100644 --- a/src/liballoc_jemalloc/Cargo.toml +++ b/src/liballoc_jemalloc/Cargo.toml @@ -12,9 +12,7 @@ test = false doc = false [dependencies] -core = { path = "../libcore" } libc = { path = "../rustc/libc_shim" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } [build-dependencies] build_helper = { path = "../build_helper" } diff --git a/src/liballoc_system/Cargo.toml b/src/liballoc_system/Cargo.toml index c34e2f203a837..cd4979e686544 100644 --- a/src/liballoc_system/Cargo.toml +++ b/src/liballoc_system/Cargo.toml @@ -10,9 +10,7 @@ test = false doc = false [dependencies] -core = { path = "../libcore" } libc = { path = "../rustc/libc_shim" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } # See comments in the source for what this dependency is [target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies] diff --git a/src/libpanic_abort/Cargo.toml b/src/libpanic_abort/Cargo.toml index 633d273b3b93c..7596e74a810d8 100644 --- a/src/libpanic_abort/Cargo.toml +++ b/src/libpanic_abort/Cargo.toml @@ -10,6 +10,4 @@ bench = false doc = false [dependencies] -core = { path = "../libcore" } libc = { path = "../rustc/libc_shim" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } diff --git a/src/libpanic_unwind/Cargo.toml b/src/libpanic_unwind/Cargo.toml index 74aaa4d5ae3db..88469a43e8b7c 100644 --- a/src/libpanic_unwind/Cargo.toml +++ b/src/libpanic_unwind/Cargo.toml @@ -10,8 +10,5 @@ bench = false doc = false [dependencies] -alloc = { path = "../liballoc" } -core = { path = "../libcore" } libc = { path = "../rustc/libc_shim" } unwind = { path = "../libunwind" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } diff --git a/src/libprofiler_builtins/Cargo.toml b/src/libprofiler_builtins/Cargo.toml index 79192fbb6819c..c56962b4940ea 100644 --- a/src/libprofiler_builtins/Cargo.toml +++ b/src/libprofiler_builtins/Cargo.toml @@ -11,9 +11,5 @@ test = false bench = false doc = false -[dependencies] -core = { path = "../libcore" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } - [build-dependencies] cc = "1.0.1" diff --git a/src/librustc_asan/Cargo.toml b/src/librustc_asan/Cargo.toml index 34d8b75a5bfb3..fb735ea56efdb 100644 --- a/src/librustc_asan/Cargo.toml +++ b/src/librustc_asan/Cargo.toml @@ -14,7 +14,4 @@ build_helper = { path = "../build_helper" } cmake = "0.1.18" [dependencies] -alloc = { path = "../liballoc" } alloc_system = { path = "../liballoc_system" } -core = { path = "../libcore" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } diff --git a/src/librustc_codegen_llvm/Cargo.toml b/src/librustc_codegen_llvm/Cargo.toml index 7cf0a1c1becaa..38b2f75502aee 100644 --- a/src/librustc_codegen_llvm/Cargo.toml +++ b/src/librustc_codegen_llvm/Cargo.toml @@ -10,39 +10,15 @@ crate-type = ["dylib"] test = false [dependencies] -bitflags = "1.0.1" cc = "1.0.1" -flate2 = "1.0" -jobserver = "0.1.5" -libc = "0.2" -log = "0.4" -num_cpus = "1.0" -rustc = { path = "../librustc" } rustc-demangle = "0.1.4" -rustc_allocator = { path = "../librustc_allocator" } -rustc_apfloat = { path = "../librustc_apfloat" } -rustc_target = { path = "../librustc_target" } -rustc_data_structures = { path = "../librustc_data_structures" } -rustc_errors = { path = "../librustc_errors" } -rustc_incremental = { path = "../librustc_incremental" } rustc_llvm = { path = "../librustc_llvm" } -rustc_platform_intrinsics = { path = "../librustc_platform_intrinsics" } -rustc_codegen_utils = { path = "../librustc_codegen_utils" } -rustc_mir = { path = "../librustc_mir" } -serialize = { path = "../libserialize" } -syntax = { path = "../libsyntax" } -syntax_pos = { path = "../libsyntax_pos" } -tempdir = "0.3" # not actually used but needed to make sure we enable the same feature set as # winapi used in librustc env_logger = { version = "0.5", default-features = false } [features] -# Used to communicate the feature to `rustc_target` in the same manner that the -# `rustc` driver script communicate this. -jemalloc = ["rustc_target/jemalloc"] - # This is used to convince Cargo to separately cache builds of `rustc_codegen_llvm` # when this option is enabled or not. That way we can build two, cache two # artifacts, and have nice speedy rebuilds. diff --git a/src/librustc_llvm/Cargo.toml b/src/librustc_llvm/Cargo.toml index 0978c2ceb141d..9c3003684c64d 100644 --- a/src/librustc_llvm/Cargo.toml +++ b/src/librustc_llvm/Cargo.toml @@ -13,9 +13,6 @@ static-libstdcpp = [] emscripten = [] [dependencies] -bitflags = "1.0" -libc = "0.2" -rustc_cratesio_shim = { path = "../librustc_cratesio_shim" } [build-dependencies] build_helper = { path = "../build_helper" } diff --git a/src/librustc_lsan/Cargo.toml b/src/librustc_lsan/Cargo.toml index 9c19b53742654..e81c64111b10f 100644 --- a/src/librustc_lsan/Cargo.toml +++ b/src/librustc_lsan/Cargo.toml @@ -14,7 +14,4 @@ build_helper = { path = "../build_helper" } cmake = "0.1.18" [dependencies] -alloc = { path = "../liballoc" } alloc_system = { path = "../liballoc_system" } -core = { path = "../libcore" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } diff --git a/src/librustc_msan/Cargo.toml b/src/librustc_msan/Cargo.toml index 17ec2b96438ad..b95fd93f1bec8 100644 --- a/src/librustc_msan/Cargo.toml +++ b/src/librustc_msan/Cargo.toml @@ -14,7 +14,4 @@ build_helper = { path = "../build_helper" } cmake = "0.1.18" [dependencies] -alloc = { path = "../liballoc" } alloc_system = { path = "../liballoc_system" } -core = { path = "../libcore" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } diff --git a/src/librustc_tsan/Cargo.toml b/src/librustc_tsan/Cargo.toml index 8bb67c0bbac5f..29bf6033bf7a2 100644 --- a/src/librustc_tsan/Cargo.toml +++ b/src/librustc_tsan/Cargo.toml @@ -14,7 +14,4 @@ build_helper = { path = "../build_helper" } cmake = "0.1.18" [dependencies] -alloc = { path = "../liballoc" } alloc_system = { path = "../liballoc_system" } -core = { path = "../libcore" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml index 5a2dce5930a4b..670e61bba549f 100644 --- a/src/libstd/Cargo.toml +++ b/src/libstd/Cargo.toml @@ -13,17 +13,29 @@ path = "lib.rs" crate-type = ["dylib", "rlib"] [dependencies] -alloc = { path = "../liballoc" } alloc_jemalloc = { path = "../liballoc_jemalloc", optional = true } alloc_system = { path = "../liballoc_system" } panic_unwind = { path = "../libpanic_unwind", optional = true } panic_abort = { path = "../libpanic_abort" } -core = { path = "../libcore" } libc = { path = "../rustc/libc_shim" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } profiler_builtins = { path = "../libprofiler_builtins", optional = true } -std_unicode = { path = "../libstd_unicode" } unwind = { path = "../libunwind" } +object = { version = "0.9", default-features = false, optional = true } + +[dependencies.gimli] +version = "0.16" +default-features = false +features = ["alloc"] +git = "https://github.com/est31/gimli" +rev = "304caacf8b73f117813b1a0d436ce24403459bf2" +optional = true + +[dependencies.addr2line] +git = "https://github.com/est31/addr2line" +branch = "no_std_prototype" +default-features = false +features = ["cpp_demangle"] +optional = true [dev-dependencies] rand = "0.4" @@ -43,7 +55,7 @@ cc = "1.0" build_helper = { path = "../build_helper" } [features] -backtrace = [] +backtrace = ["addr2line", "object", "gimli"] debug-jemalloc = ["alloc_jemalloc/debug"] jemalloc = ["alloc_jemalloc"] force_alloc_system = [] diff --git a/src/libstd/build.rs b/src/libstd/build.rs index c001e4e8cebf9..679ae6cb4c7c9 100644 --- a/src/libstd/build.rs +++ b/src/libstd/build.rs @@ -13,21 +13,10 @@ extern crate build_helper; extern crate cc; -use build_helper::native_lib_boilerplate; use std::env; -use std::fs::File; fn main() { let target = env::var("TARGET").expect("TARGET was not set"); - if cfg!(feature = "backtrace") && - !target.contains("cloudabi") && - !target.contains("emscripten") && - !target.contains("fuchsia") && - !target.contains("msvc") && - !target.contains("wasm32") - { - let _ = build_libbacktrace(&target); - } if target.contains("linux") { if target.contains("android") { @@ -82,56 +71,3 @@ fn main() { println!("cargo:rustc-link-lib=compiler_rt"); } } - -fn build_libbacktrace(target: &str) -> Result<(), ()> { - let native = native_lib_boilerplate("libbacktrace", "libbacktrace", "backtrace", "")?; - - let mut build = cc::Build::new(); - build - .flag("-fvisibility=hidden") - .include("../libbacktrace") - .include(&native.out_dir) - .out_dir(&native.out_dir) - .warnings(false) - .file("../libbacktrace/alloc.c") - .file("../libbacktrace/backtrace.c") - .file("../libbacktrace/dwarf.c") - .file("../libbacktrace/fileline.c") - .file("../libbacktrace/posix.c") - .file("../libbacktrace/read.c") - .file("../libbacktrace/sort.c") - .file("../libbacktrace/state.c"); - - if target.contains("darwin") { - build.file("../libbacktrace/macho.c"); - } else if target.contains("windows") { - build.file("../libbacktrace/pecoff.c"); - } else { - build.file("../libbacktrace/elf.c"); - - if target.contains("64") { - build.define("BACKTRACE_ELF_SIZE", "64"); - } else { - build.define("BACKTRACE_ELF_SIZE", "32"); - } - } - - File::create(native.out_dir.join("backtrace-supported.h")).unwrap(); - build.define("BACKTRACE_SUPPORTED", "1"); - build.define("BACKTRACE_USES_MALLOC", "1"); - build.define("BACKTRACE_SUPPORTS_THREADS", "0"); - build.define("BACKTRACE_SUPPORTS_DATA", "0"); - - File::create(native.out_dir.join("config.h")).unwrap(); - if !target.contains("apple-ios") && - !target.contains("solaris") && - !target.contains("redox") && - !target.contains("android") { - build.define("HAVE_DL_ITERATE_PHDR", "1"); - } - build.define("_GNU_SOURCE", "1"); - build.define("_LARGE_FILES", "1"); - - build.compile("backtrace"); - Ok(()) -} diff --git a/src/libstd/sys/unix/backtrace/printing/mod.rs b/src/libstd/sys/unix/backtrace/printing/mod.rs index caa60712b1d58..5a879dbe8f68e 100644 --- a/src/libstd/sys/unix/backtrace/printing/mod.rs +++ b/src/libstd/sys/unix/backtrace/printing/mod.rs @@ -25,10 +25,10 @@ where Ok(false) } -#[cfg(not(target_os = "emscripten"))] +#[cfg(target_os = "fuchsia")] pub use sys_common::gnu::libbacktrace::foreach_symbol_fileline; -#[cfg(not(target_os = "emscripten"))] +#[cfg(target_os = "fuchsia")] pub fn resolve_symname(frame: Frame, callback: F, bc: &BacktraceContext) -> io::Result<()> where F: FnOnce(Option<&str>) -> io::Result<()> @@ -41,3 +41,20 @@ where } }, bc) } + +#[cfg(not(any(target_os = "fuchsia", target_os = "emscripten")))] +pub use sys_common::addr2line::foreach_symbol_fileline; + +#[cfg(not(any(target_os = "fuchsia", target_os = "emscripten")))] +pub fn resolve_symname(frame: Frame, callback: F, bc: &BacktraceContext) -> io::Result<()> +where + F: FnOnce(Option<&str>) -> io::Result<()> +{ + ::sys_common::addr2line::resolve_symname(frame, |symname| { + if symname.is_some() { + callback(symname) + } else { + dladdr::resolve_symname(frame, callback, bc) + } + }, bc) +} diff --git a/src/libstd/sys_common/addr2line.rs b/src/libstd/sys_common/addr2line.rs new file mode 100644 index 0000000000000..2fa7e822f1738 --- /dev/null +++ b/src/libstd/sys_common/addr2line.rs @@ -0,0 +1,143 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern crate addr2line; +extern crate gimli; +extern crate object; + +use libc::{mmap, size_t, PROT_READ, MAP_SHARED, MAP_FAILED}; + +use io; +use ptr; +use env; + +use cell::UnsafeCell; +use marker::Sync; +use sys::backtrace::BacktraceContext; +use sys_common::backtrace::Frame; +use os::unix::io::AsRawFd; +use fs::File; +use slice::from_raw_parts; +use self::addr2line::Context; +use self::gimli::{EndianRcSlice, RunTimeEndian}; + +struct ThreadSafe(UnsafeCell); + +unsafe impl Sync for ThreadSafe {} + +macro_rules! err { + ($e:expr) => { + return Err(io::Error::new( + io::ErrorKind::Other, + $e) + ); + } +} + +struct Ctx { + ctx: Context>, + _file: File, +} + +impl Ctx { + fn init() -> io::Result { + let filename = env::current_exe()?; + let file = File::open(&filename)?; + let file_len = file.metadata()?.len(); + + let map_ptr = unsafe { + mmap(ptr::null_mut(), + file_len as size_t, + PROT_READ, + MAP_SHARED, + file.as_raw_fd(), + 0) + }; + if map_ptr == MAP_FAILED { + err!("mapping the executable into memory failed"); + } + + let map = unsafe { from_raw_parts(map_ptr as * mut u8, file_len as usize) }; + let object_file = match object::File::parse(&*map) { + Ok(v) => v, + Err(_) => err!("could not parse the object file for backtrace creation"), + }; + let ctx = match Context::new(&object_file) { + Ok(v) => v, + Err(_) => err!("could not create backtrace parsing context"), + }; + + Ok(Ctx { + ctx, + _file: file, + }) + } + fn with_static io::Result>(f: F) -> io::Result { + static CTX_CELL: ThreadSafe> = ThreadSafe(UnsafeCell::new(None)); + let cell_ref: &mut Option<_> = unsafe { &mut *CTX_CELL.0.get() }; + if cell_ref.is_none() { + *cell_ref = Some(Ctx::init()?); + } + let ctx = if let Some(c) = cell_ref { + c + } else { + unreachable!() + }; + f(ctx) + } +} + +pub fn foreach_symbol_fileline(frame: Frame, + mut f: F, + _: &BacktraceContext) -> io::Result +where F: FnMut(&[u8], u32) -> io::Result<()> +{ + Ctx::with_static(|ctx|{ + let mut frames_iter = match ctx.ctx.find_frames(frame.exact_position as u64) { + Ok(v) => v, + Err(_) => err!("error during binary parsing"), + }; + for frame_opt in frames_iter.next() { + let loc_opt = frame_opt.and_then(|v| v.location); + let file_line_opt = loc_opt.map(|v| (v.file, v.line)); + if let Some((Some(file), Some(line))) = file_line_opt { + f(file.as_bytes(), line as u32)?; + } + } + // FIXME: when should we return true here? + Ok(false) + }) +} + +/// Converts a pointer to symbol to its string value. +pub fn resolve_symname(frame: Frame, + callback: F, + _: &BacktraceContext) -> io::Result<()> + where F: FnOnce(Option<&str>) -> io::Result<()> +{ + Ctx::with_static(|ctx|{ + let mut frames_iter = match ctx.ctx.find_frames(frame.symbol_addr as u64) { + Ok(v) => v, + Err(_) => err!("error during binary parsing"), + }; + let frame_opt = match frames_iter.next() { + Ok(v) => v, + Err(_) => err!("error during symbolification"), + }; + match frame_opt.and_then(|v| v.function) { + Some(n) => match n.raw_name() { + Ok(v) => callback(Some(&*v))?, + Err(_) => err!("error during name resolval"), + }, + None => callback(None)?, + } + Ok(()) + }) +} diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs index d0c4d6a773746..6fdc8bdfa7461 100644 --- a/src/libstd/sys_common/mod.rs +++ b/src/libstd/sys_common/mod.rs @@ -66,11 +66,13 @@ cfg_if! { } #[cfg(feature = "backtrace")] -#[cfg(any(all(unix, not(target_os = "emscripten")), - all(windows, target_env = "gnu"), - target_os = "redox"))] +#[cfg(target_os = "fuchsia")] pub mod gnu; +#[cfg(feature = "backtrace")] +#[cfg(not(target_os = "fuchsia"))] +pub mod addr2line; + // common error constructors /// A trait for viewing representations from std types diff --git a/src/libunwind/Cargo.toml b/src/libunwind/Cargo.toml index 4760461df64e3..44a99b3a0cc48 100644 --- a/src/libunwind/Cargo.toml +++ b/src/libunwind/Cargo.toml @@ -12,6 +12,4 @@ bench = false doc = false [dependencies] -core = { path = "../libcore" } libc = { path = "../rustc/libc_shim" } -compiler_builtins = { path = "../rustc/compiler_builtins_shim" } diff --git a/src/rustc/dlmalloc_shim/Cargo.toml b/src/rustc/dlmalloc_shim/Cargo.toml index b6f8550829fe0..7edbda009e894 100644 --- a/src/rustc/dlmalloc_shim/Cargo.toml +++ b/src/rustc/dlmalloc_shim/Cargo.toml @@ -8,7 +8,3 @@ path = "../../dlmalloc/src/lib.rs" test = false bench = false doc = false - -[dependencies] -core = { path = "../../libcore" } -compiler_builtins = { path = "../../rustc/compiler_builtins_shim" } diff --git a/src/rustc/libc_shim/Cargo.toml b/src/rustc/libc_shim/Cargo.toml index e77897d643313..09b2bed919a5c 100644 --- a/src/rustc/libc_shim/Cargo.toml +++ b/src/rustc/libc_shim/Cargo.toml @@ -10,28 +10,6 @@ test = false bench = false doc = false -[dependencies] -# Specify the path to libcore; at the time of writing, removing this shim in -# favor of using libc from git results in a compilation failure: -# -# Building stage0 std artifacts (x86_64-apple-darwin -> x86_64-apple-darwin) -# Compiling libc v0.0.0 (file:///Users/tamird/src/rust/src/rustc/libc_shim) -# error[E0463]: can't find crate for `core` -# -# error: aborting due to previous error -# -# error: Could not compile `libc`. -# -# Caused by: -# process didn't exit successfully: `/Users/tamird/src/rust/build/bootstrap/debug/rustc --crate-name libc src/rustc/libc_shim/../../liblibc/src/lib.rs --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 --cfg feature="default" --cfg feature="no_std" --cfg feature="stdbuild" -C metadata=d758f87058112d7d -C extra-filename=-d758f87058112d7d --out-dir /Users/tamird/src/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -L dependency=/Users/tamird/src/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps -L dependency=/Users/tamird/src/rust/build/x86_64-apple-darwin/stage0-std/release/deps` (exit code: 101) -# thread 'main' panicked at 'command did not execute successfully: "/Users/tamird/src/rust/build/x86_64-apple-darwin/stage0/bin/cargo" "build" "-j" "4" "--target" "x86_64-apple-darwin" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/Users/tamird/src/rust/src/libstd/Cargo.toml" "--message-format" "json" -# expected success, got: exit code: 101', src/bootstrap/compile.rs:883:8 -# -# See https://github.com/rust-lang/rfcs/pull/1133. -core = { path = "../../libcore" } -compiler_builtins = { path = "../compiler_builtins_shim" } - - [features] # Certain parts of libc are conditionally compiled differently than when used # outside rustc. See https://github.com/rust-lang/libc/search?l=Rust&q=stdbuild&type=&utf8=%E2%9C%93.