Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 83d5fbff2c367f038911d54fbe9446ce25cc338b
Choose a base ref
...
head repository: rust-lang/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f668999153d78903658b6937a099819e0b634a06
Choose a head ref
Loading
Showing with 5,719 additions and 4,471 deletions.
  1. +1 −0 .gitignore
  2. +3 −3 .gitmodules
  3. +3 −2 README.md
  4. +18 −10 src/Cargo.lock
  5. +20 −14 src/bootstrap/bin/rustc.rs
  6. +1 −1 src/bootstrap/bootstrap.py
  7. +10 −4 src/bootstrap/cc.rs
  8. +7 −3 src/bootstrap/channel.rs
  9. +36 −41 src/bootstrap/check.rs
  10. +20 −17 src/bootstrap/compile.rs
  11. +22 −7 src/bootstrap/config.rs
  12. +29 −40 src/bootstrap/dist.rs
  13. +9 −9 src/bootstrap/doc.rs
  14. +23 −31 src/bootstrap/flags.rs
  15. +1 −1 src/bootstrap/install.rs
  16. +83 −49 src/bootstrap/lib.rs
  17. +1 −1 src/bootstrap/metadata.rs
  18. +4 −4 src/bootstrap/native.rs
  19. +72 −96 src/bootstrap/sanity.rs
  20. +63 −71 src/bootstrap/step.rs
  21. +3 −12 src/bootstrap/util.rs
  22. +4 −1 src/build_helper/lib.rs
  23. +4 −3 src/ci/init_repo.sh
  24. +0 −1 src/compiler-rt
  25. +7 −0 src/doc/unstable-book/src/language-features/allocator-internals.md
  26. +0 −119 src/doc/unstable-book/src/language-features/allocator.md
  27. +71 −0 src/doc/unstable-book/src/language-features/global-allocator.md
  28. +0 −35 src/doc/unstable-book/src/library-features/compiler-builtins-lib.md
  29. +7 −0 src/doc/unstable-book/src/library-features/proc-macro.md
  30. +21 −2 src/liballoc/allocator.rs
  31. +6 −4 src/liballoc/arc.rs
  32. +13 −14 src/liballoc/boxed.rs
  33. +8 −18 src/liballoc/btree/node.rs
  34. +171 −182 src/liballoc/heap.rs
  35. +2 −4 src/liballoc/lib.rs
  36. +0 −61 src/liballoc/oom.rs
  37. +11 −11 src/liballoc/raw_vec.rs
  38. +6 −5 src/liballoc/rc.rs
  39. +4 −4 src/liballoc/string.rs
  40. +5 −0 src/liballoc/tests/vec.rs
  41. +1 −2 src/liballoc/tests/vec_deque.rs
  42. +8 −5 src/liballoc/vec.rs
  43. +4 −0 src/liballoc_jemalloc/Cargo.toml
  44. +135 −66 src/liballoc_jemalloc/lib.rs
  45. +3 −0 src/liballoc_system/Cargo.toml
  46. +337 −142 src/liballoc_system/lib.rs
  47. +268 −0 src/liballoc_system/old.rs
  48. +0 −2 src/libcollections/lib.rs
  49. +1 −0 src/libcompiler_builtins
  50. +0 −19 src/libcompiler_builtins/Cargo.toml
  51. +0 −423 src/libcompiler_builtins/build.rs
  52. +0 −721 src/libcompiler_builtins/lib.rs
  53. +1 −1 src/libcore/cmp.rs
  54. +129 −10 src/libcore/fmt/builders.rs
  55. +0 −6 src/libcore/iter/mod.rs
  56. +0 −213 src/libcore/iter/range.rs
  57. +16 −26 src/libcore/tests/iter.rs
  58. +0 −1 src/libcore/tests/lib.rs
  59. +1 −0 src/libproc_macro/Cargo.toml
  60. +532 −52 src/libproc_macro/lib.rs
  61. +263 −0 src/libproc_macro/quote.rs
  62. +0 −103 src/libproc_macro_plugin/lib.rs
  63. +0 −230 src/libproc_macro_plugin/quote.rs
  64. +1 −1 src/libprofiler_builtins/build.rs
  65. +1 −1 src/librand/lib.rs
  66. +6 −6 src/librustc/cfg/construct.rs
  67. +1 −1 src/librustc/dep_graph/dep_tracking_map.rs
  68. +2 −2 src/librustc/dep_graph/query.rs
  69. +1 −1 src/librustc/dep_graph/shadow.rs
  70. +1 −1 src/librustc/dep_graph/thread.rs
  71. +53 −53 src/librustc/hir/lowering.rs
  72. +7 −7 src/librustc/hir/map/blocks.rs
  73. +1 −1 src/librustc/hir/map/collector.rs
  74. +3 −3 src/librustc/hir/map/def_collector.rs
  75. +4 −4 src/librustc/hir/map/definitions.rs
  76. +2 −2 src/librustc/hir/map/hir_id_validator.rs
  77. +4 −4 src/librustc/hir/map/mod.rs
  78. +1 −1 src/librustc/hir/mod.rs
  79. +2 −2 src/librustc/hir/print.rs
  80. +1 −1 src/librustc/ich/caching_codemap_view.rs
  81. +2 −2 src/librustc/ich/hcx.rs
  82. +1 −2 src/librustc/ich/impls_syntax.rs
  83. +1 −1 src/librustc/infer/combine.rs
  84. +1 −1 src/librustc/infer/freshen.rs
  85. +1 −1 src/librustc/infer/fudge.rs
  86. +1 −1 src/librustc/infer/higher_ranked/mod.rs
  87. +9 −9 src/librustc/infer/mod.rs
  88. +6 −6 src/librustc/infer/region_inference/mod.rs
  89. +3 −3 src/librustc/infer/type_variable.rs
  90. +1 −0 src/librustc/lib.rs
  91. +7 −7 src/librustc/lint/context.rs
  92. +1 −1 src/librustc/lint/mod.rs
  93. +26 −0 src/librustc/middle/allocator.rs
  94. +8 −8 src/librustc/middle/dataflow.rs
  95. +9 −4 src/librustc/middle/dead.rs
  96. +14 −15 src/librustc/middle/dependency_format.rs
  97. +1 −1 src/librustc/middle/effect.rs
  98. +1 −1 src/librustc/middle/entry.rs
  99. +1 −1 src/librustc/middle/intrinsicck.rs
  100. +3 −3 src/librustc/middle/lang_items.rs
  101. +5 −5 src/librustc/middle/liveness.rs
  102. +10 −10 src/librustc/middle/mem_categorization.rs
  103. +4 −4 src/librustc/middle/reachable.rs
  104. +10 −10 src/librustc/middle/resolve_lifetime.rs
  105. +7 −6 src/librustc/middle/stability.rs
  106. +29 −29 src/librustc/mir/mod.rs
  107. +5 −5 src/librustc/mir/tcx.rs
  108. +5 −5 src/librustc/mir/traversal.rs
  109. +2 −2 src/librustc/session/code_stats.rs
  110. +20 −20 src/librustc/session/config.rs
  111. +4 −4 src/librustc/session/filesearch.rs
  112. +18 −12 src/librustc/session/mod.rs
  113. +2 −2 src/librustc/traits/coherence.rs
  114. +5 −5 src/librustc/traits/fulfill.rs
  115. +1 −1 src/librustc/traits/mod.rs
  116. +10 −10 src/librustc/traits/project.rs
  117. +10 −10 src/librustc/traits/select.rs
  118. +16 −16 src/librustc/traits/structural_impls.rs
  119. +6 −6 src/librustc/traits/util.rs
  120. +11 −11 src/librustc/ty/context.rs
  121. +6 −6 src/librustc/ty/fold.rs
  122. +1 −1 src/librustc/ty/inhabitedness/def_id_forest.rs
  123. +1 −1 src/librustc/ty/item_path.rs
  124. +17 −17 src/librustc/ty/layout.rs
  125. +1 −1 src/librustc/ty/maps.rs
  126. +12 −12 src/librustc/ty/mod.rs
  127. +4 −4 src/librustc/ty/relate.rs
  128. +12 −12 src/librustc/ty/structural_impls.rs
  129. +2 −2 src/librustc/ty/sty.rs
  130. +3 −3 src/librustc/ty/subst.rs
  131. +4 −4 src/librustc/ty/wf.rs
  132. +4 −2 src/{libproc_macro_plugin → librustc_allocator}/Cargo.toml
  133. +498 −0 src/librustc_allocator/expand.rs
  134. +101 −0 src/librustc_allocator/lib.rs
  135. +1 −0 src/librustc_asan/Cargo.toml
  136. +9 −0 src/librustc_asan/lib.rs
  137. +1 −1 src/librustc_back/target/aarch64_unknown_freebsd.rs
  138. +1 −1 src/librustc_back/target/aarch64_unknown_linux_gnu.rs
  139. +0 −1 src/librustc_back/target/bitrig_base.rs
  140. +0 −1 src/librustc_back/target/fuchsia_base.rs
  141. +1 −1 src/librustc_back/target/mips64_unknown_linux_gnuabi64.rs
  142. +1 −1 src/librustc_back/target/mips64el_unknown_linux_gnuabi64.rs
  143. +1 −1 src/librustc_back/target/mips_unknown_linux_gnu.rs
  144. +1 −1 src/librustc_back/target/mips_unknown_linux_musl.rs
  145. +1 −1 src/librustc_back/target/mips_unknown_linux_uclibc.rs
  146. +1 −1 src/librustc_back/target/mipsel_unknown_linux_gnu.rs
  147. +1 −1 src/librustc_back/target/mipsel_unknown_linux_musl.rs
  148. +1 −1 src/librustc_back/target/mipsel_unknown_linux_uclibc.rs
  149. +7 −11 src/librustc_back/target/mod.rs
  150. +0 −1 src/librustc_back/target/openbsd_base.rs
  151. +1 −1 src/librustc_back/target/powerpc64_unknown_linux_gnu.rs
  152. +1 −1 src/librustc_back/target/powerpc64le_unknown_linux_gnu.rs
  153. +1 −1 src/librustc_back/target/powerpc_unknown_linux_gnu.rs
  154. +0 −2 src/librustc_back/target/redox_base.rs
  155. +1 −1 src/librustc_back/target/s390x_unknown_linux_gnu.rs
  156. +1 −1 src/librustc_back/target/sparc64_unknown_linux_gnu.rs
  157. +0 −1 src/librustc_back/target/windows_msvc_base.rs
  158. +1 −1 src/librustc_back/target/x86_64_rumprun_netbsd.rs
  159. +1 −1 src/librustc_driver/Cargo.toml
  160. +8 −0 src/librustc_driver/driver.rs
  161. +72 −3 src/librustc_driver/lib.rs
  162. +2 −1 src/librustc_lint/builtin.rs
  163. +1 −0 src/librustc_llvm/ffi.rs
  164. +1 −0 src/librustc_lsan/Cargo.toml
  165. +9 −0 src/librustc_lsan/lib.rs
  166. +138 −54 src/librustc_metadata/creader.rs
  167. +16 −5 src/librustc_metadata/cstore.rs
  168. +6 −2 src/librustc_metadata/cstore_impl.rs
  169. +1 −1 src/librustc_metadata/decoder.rs
  170. +9 −3 src/librustc_metadata/encoder.rs
  171. +2 −0 src/librustc_metadata/schema.rs
  172. +1 −0 src/librustc_msan/Cargo.toml
  173. +9 −0 src/librustc_msan/lib.rs
  174. +1 −0 src/librustc_trans/Cargo.toml
  175. +117 −0 src/librustc_trans/allocator.rs
  176. +1 −1 src/librustc_trans/attributes.rs
  177. +75 −10 src/librustc_trans/back/link.rs
  178. +0 −1 src/librustc_trans/back/symbol_export.rs
  179. +21 −2 src/librustc_trans/back/write.rs
  180. +40 −0 src/librustc_trans/base.rs
  181. +0 −11 src/librustc_trans/declare.rs
  182. +3 −0 src/librustc_trans/lib.rs
  183. +12 −0 src/librustc_trans/trans_item.rs
  184. +1 −1 src/librustdoc/html/highlight.rs
  185. +28 −21 src/librustdoc/html/static/main.js
  186. +1 −1 src/libstd/Cargo.toml
  187. +5 −6 src/libstd/collections/hash/table.rs
  188. +2 −2 src/libstd/error.rs
  189. +16 −8 src/libstd/f32.rs
  190. +8 −5 src/libstd/f64.rs
  191. +4 −4 src/libstd/ffi/c_str.rs
  192. +4 −4 src/libstd/ffi/os_str.rs
  193. +165 −0 src/libstd/heap.rs
  194. +6 −8 src/libstd/lib.rs
  195. +4 −4 src/libstd/path.rs
  196. +13 −6 src/libstd/sys/redox/fs.rs
  197. +2 −0 src/libstd/sys/redox/syscall/flag.rs
  198. +0 −20 src/libstd/sys/unix/mod.rs
  199. +0 −18 src/libstd/sys/windows/mod.rs
  200. +168 −155 src/libstd_unicode/tables.rs
  201. +4 −4 src/libsyntax/ast.rs
  202. +2 −2 src/libsyntax/attr.rs
  203. +5 −16 src/libsyntax/ext/base.rs
  204. +7 −1 src/libsyntax/ext/build.rs
  205. +23 −47 src/libsyntax/ext/expand.rs
  206. +20 −20 src/libsyntax/ext/quote.rs
  207. +9 −15 src/libsyntax/ext/tt/macro_parser.rs
  208. +6 −5 src/libsyntax/ext/tt/macro_rules.rs
  209. +8 −5 src/libsyntax/ext/tt/quoted.rs
  210. +34 −26 src/libsyntax/ext/tt/transcribe.rs
  211. +34 −18 src/libsyntax/feature_gate.rs
  212. +3 −4 src/libsyntax/fold.rs
  213. +2 −2 src/libsyntax/parse/attr.rs
  214. +23 −21 src/libsyntax/parse/lexer/mod.rs
  215. +8 −4 src/libsyntax/parse/lexer/tokentrees.rs
  216. +9 −6 src/libsyntax/parse/mod.rs
  217. +11 −8 src/libsyntax/parse/parser.rs
  218. +132 −11 src/libsyntax/parse/token.rs
  219. +1 −2 src/libsyntax/print/pprust.rs
  220. +184 −41 src/libsyntax/tokenstream.rs
  221. +1 −1 src/libsyntax/util/parser_testing.rs
  222. +9 −1 src/libsyntax/util/rc_slice.rs
  223. +6 −1 src/libsyntax_ext/concat_idents.rs
  224. +4 −11 src/libsyntax_ext/deriving/custom.rs
  225. +8 −5 src/libsyntax_ext/format.rs
  226. +2 −2 src/libsyntax_ext/proc_macro_impl.rs
  227. +9 −15 src/libsyntax_pos/hygiene.rs
  228. +1 −1 src/libsyntax_pos/lib.rs
  229. +24 −0 src/rustc/compiler_builtins_shim/Cargo.toml
  230. +4 −5 src/{test/run-pass/allocator-system.rs → rustc/compiler_builtins_shim/build.rs}
  231. +6 −0 src/rustllvm/.editorconfig
  232. +4 −0 src/rustllvm/llvm-rebuild-trigger
  233. +1 −1 src/test/codegen/function-arguments.rs
  234. +0 −21 src/test/compile-fail/allocator-depends-on-needs-allocators.rs
  235. +0 −41 src/test/compile-fail/allocator-dylib-is-system.rs
  236. +0 −41 src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs
  237. +5 −5 src/test/compile-fail/{auxiliary/allocator3.rs → allocator/auxiliary/system-allocator.rs}
  238. +7 −4 src/test/compile-fail/{auxiliary/needs_allocator.rs → allocator/auxiliary/system-allocator2.rs}
  239. +16 −0 src/test/compile-fail/allocator/function-allocator.rs
  240. +26 −0 src/test/compile-fail/allocator/not-an-allocator.rs
  241. +9 −6 src/test/compile-fail/{ → allocator}/two-allocators.rs
  242. +25 −0 src/test/compile-fail/allocator/two-allocators2.rs
  243. +21 −0 src/test/compile-fail/allocator/two-allocators3.rs
  244. +0 −1 src/test/compile-fail/asm-out-assign-imm.rs
  245. +3 −4 src/test/{run-pass/auxiliary/clibrary.rs → compile-fail/feature-gate-allocator_internals.rs}
  246. +4 −5 src/test/compile-fail/{auxiliary/allocator-dylib.rs → feature-gate-global_allocator.rs}
  247. +1 −1 src/test/compile-fail/macro-context.rs
  248. +0 −21 src/test/compile-fail/two-allocators-2.rs
  249. +0 −23 src/test/compile-fail/two-allocators-3.rs
  250. +1 −3 src/test/run-make/no-duplicate-libs/Makefile
  251. +5 −3 src/test/{compile-fail/feature-gate-allocator.rs → run-make/no-duplicate-libs/bar.c}
  252. +0 −25 src/test/run-make/no-duplicate-libs/bar.rs
  253. +2 −3 src/test/{compile-fail/auxiliary/allocator-dylib2.rs → run-make/no-duplicate-libs/foo.c}
  254. +0 −25 src/test/run-make/no-duplicate-libs/foo.rs
  255. +3 −3 src/test/run-make/no-duplicate-libs/main.rs
  256. +15 −28 src/test/run-pass-fulldeps/auxiliary/cond_plugin.rs
  257. +7 −16 src/test/run-pass-fulldeps/auxiliary/hello_macro.rs
  258. +20 −30 src/test/run-pass-fulldeps/auxiliary/proc_macro_def.rs
  259. +0 −40 src/test/run-pass-fulldeps/macro-quote-1.rs
  260. +5 −3 src/test/run-pass-fulldeps/macro-quote-cond.rs
  261. +4 −4 src/test/run-pass-fulldeps/macro-quote-test.rs
  262. +1 −1 src/test/run-pass-fulldeps/proc-macro/auxiliary/attr-args.rs
  263. +36 −0 src/test/run-pass-fulldeps/proc-macro/auxiliary/count_compound_ops.rs
  264. +19 −0 src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example.rs
  265. +36 −0 src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example_codegen.rs
  266. +7 −6 src/test/{run-pass/allocator-default.rs → run-pass-fulldeps/proc-macro/count_compound_ops.rs}
  267. +27 −0 src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs
  268. +4 −3 src/test/run-pass-fulldeps/proc_macro.rs
  269. +5 −8 src/test/run-pass/allocator-alloc-one.rs
  270. +0 −29 src/test/run-pass/allocator-override.rs
  271. +15 −4 src/test/{compile-fail/auxiliary/allocator2.rs → run-pass/allocator/auxiliary/custom-as-global.rs}
  272. +31 −0 src/test/run-pass/allocator/auxiliary/custom.rs
  273. +7 −4 src/test/{compile-fail/auxiliary/allocator1.rs → run-pass/allocator/auxiliary/helper.rs}
  274. +68 −0 src/test/run-pass/allocator/custom.rs
  275. +44 −0 src/test/run-pass/allocator/xcrate-use.rs
  276. +57 −0 src/test/run-pass/allocator/xcrate-use2.rs
  277. +4 −5 src/test/run-pass/lib-defaults.rs
  278. +1 −1 src/test/run-pass/range_inclusive.rs
  279. +41 −34 src/test/run-pass/realloc-16687.rs
  280. +3 −4 src/test/run-pass/rfc1717/library-override.rs
  281. +15 −15 src/test/run-pass/smallest-hello-world.rs
  282. +1 −1 src/test/run-pass/sync-send-iterators-in-libcore.rs
  283. +1 −1 src/test/ui/token/macro-incomplete-parse.rs
  284. +3 −0 src/test/ui/token/macro-incomplete-parse.stderr
  285. +0 −8 src/tools/tidy/src/cargo.rs
  286. +1 −1 src/tools/tidy/src/features.rs
  287. +1 −0 src/tools/tidy/src/lib.rs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -51,6 +51,7 @@
.hg/
.hgignore
.idea
*.iml
__pycache__/
*.py[cod]
*$py.class
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -2,9 +2,6 @@
path = src/llvm
url = https://github.com/rust-lang/llvm.git
branch = master
[submodule "src/compiler-rt"]
path = src/compiler-rt
url = https://github.com/rust-lang/compiler-rt.git
[submodule "src/rt/hoedown"]
path = src/rt/hoedown
url = https://github.com/rust-lang/hoedown.git
@@ -33,3 +30,6 @@
[submodule "src/tools/rls"]
path = src/tools/rls
url = https://github.com/rust-lang-nursery/rls.git
[submodule "src/libcompiler_builtins"]
path = src/libcompiler_builtins
url = https://github.com/rust-lang-nursery/compiler-builtins
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -40,8 +40,9 @@ Read ["Installation"] from [The Book].

> ***Note:*** Install locations can be adjusted by copying the config file
> from `./src/bootstrap/config.toml.example` to `./config.toml`, and
> adjusting the `prefix` option under `[install]`. Various other options are
> also supported, and are documented in the config file.
> adjusting the `prefix` option under `[install]`. Various other options, such
> as enabling debug information, are also supported, and are documented in
> the config file.

When complete, `sudo ./x.py install` will place several programs into
`/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
28 changes: 18 additions & 10 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 20 additions & 14 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
@@ -75,16 +75,11 @@ fn main() {
Err(_) => 0,
};

// Build scripts always use the snapshot compiler which is guaranteed to be
// able to produce an executable, whereas intermediate compilers may not
// have the standard library built yet and may not be able to produce an
// executable. Otherwise we just use the standard compiler we're
// bootstrapping with.
//
// Also note that cargo will detect the version of the compiler to trigger
// a rebuild when the compiler changes. If this happens, we want to make
// sure to use the actual compiler instead of the snapshot compiler becase
// that's the one that's actually changing.
// Use a different compiler for build scripts, since there may not yet be a
// libstd for the real compiler to use. However, if Cargo is attempting to
// determine the version of the compiler, the real compiler needs to be
// used. Currently, these two states are differentiated based on whether
// --target and -vV is/isn't passed.
let (rustc, libdir) = if target.is_none() && version.is_none() {
("RUSTC_SNAPSHOT", "RUSTC_SNAPSHOT_LIBDIR")
} else {
@@ -142,6 +137,11 @@ fn main() {
}
}

let crate_name = args.windows(2)
.find(|a| &*a[0] == "--crate-name")
.unwrap();
let crate_name = &*crate_name[1];

// If we're compiling specifically the `panic_abort` crate then we pass
// the `-C panic=abort` option. Note that we do not do this for any
// other crate intentionally as this is the only crate for now that we
@@ -150,9 +150,7 @@ fn main() {
// This... is a bit of a hack how we detect this. Ideally this
// information should be encoded in the crate I guess? Would likely
// require an RFC amendment to RFC 1513, however.
let is_panic_abort = args.windows(2)
.any(|a| &*a[0] == "--crate-name" && &*a[1] == "panic_abort");
if is_panic_abort {
if crate_name == "panic_abort" {
cmd.arg("-C").arg("panic=abort");
}

@@ -167,7 +165,15 @@ fn main() {
Ok(s) => if s == "true" { "y" } else { "n" },
Err(..) => "n",
};
cmd.arg("-C").arg(format!("debug-assertions={}", debug_assertions));

// The compiler builtins are pretty sensitive to symbols referenced in
// libcore and such, so we never compile them with debug assertions.
if crate_name == "compiler_builtins" {
cmd.arg("-C").arg("debug-assertions=no");
} else {
cmd.arg("-C").arg(format!("debug-assertions={}", debug_assertions));
}

if let Ok(s) = env::var("RUSTC_CODEGEN_UNITS") {
cmd.arg("-C").arg(format!("codegen-units={}", s));
}
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
@@ -583,7 +583,7 @@ def update_submodules(self):
(self.get_toml('jemalloc') or
self.get_mk('CFG_JEMALLOC_ROOT'))))]
run(["git", "submodule", "update",
"--init"] + submodules,
"--init", "--recursive"] + submodules,
cwd=self.rust_root, verbose=self.verbose)
run(["git", "submodule", "-q", "foreach", "git",
"reset", "-q", "--hard"],
14 changes: 10 additions & 4 deletions src/bootstrap/cc.rs
Original file line number Diff line number Diff line change
@@ -42,10 +42,13 @@ use config::Target;
pub fn find(build: &mut Build) {
// For all targets we're going to need a C compiler for building some shims
// and such as well as for being a linker for Rust code.
for target in build.config.target.iter() {
//
// This includes targets that aren't necessarily passed on the commandline
// (FIXME: Perhaps it shouldn't?)
for target in &build.config.target {
let mut cfg = gcc::Config::new();
cfg.cargo_metadata(false).opt_level(0).debug(false)
.target(target).host(&build.config.build);
.target(target).host(&build.build);

let config = build.config.target_config.get(target);
if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
@@ -64,10 +67,13 @@ pub fn find(build: &mut Build) {
}

// For all host triples we need to find a C++ compiler as well
for host in build.config.host.iter() {
//
// This includes hosts that aren't necessarily passed on the commandline
// (FIXME: Perhaps it shouldn't?)
for host in &build.config.host {
let mut cfg = gcc::Config::new();
cfg.cargo_metadata(false).opt_level(0).debug(false).cpp(true)
.target(host).host(&build.config.build);
.target(host).host(&build.build);
let config = build.config.target_config.get(host);
if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
cfg.compiler(cxx);
10 changes: 7 additions & 3 deletions src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
@@ -23,12 +23,12 @@ use build_helper::output;
use Build;

// The version number
pub const CFG_RELEASE_NUM: &'static str = "1.20.0";
pub const CFG_RELEASE_NUM: &str = "1.20.0";

// An optional number to put after the label, e.g. '.2' -> '-beta.2'
// Be sure to make this starts with a dot to conform to semver pre-release
// versions (section 9)
pub const CFG_PRERELEASE_VERSION: &'static str = ".1";
pub const CFG_PRERELEASE_VERSION: &str = ".1";

pub struct GitInfo {
inner: Option<Info>,
@@ -99,6 +99,10 @@ impl GitInfo {
version.push_str(&inner.commit_date);
version.push_str(")");
}
return version
version
}

pub fn is_git(&self) -> bool {
self.inner.is_some()
}
}
Loading