rust/src
Ralf Jung 1e31a7c1e7
Rollup merge of #73136 - alexcrichton:thinlto-compiler-builtins, r=Mark-Simulacrum
Change how compiler-builtins gets many CGUs

This commit intends to fix an accidental regression from #70846. The
goal of #70846 was to build compiler-builtins with a maximal number of
CGUs to ensure that each module in the source corresponds to an object
file. This high degree of control for compiler-builtins is desirable to
ensure that there's at most one exported symbol per CGU, ideally
enabling compiler-builtins to not conflict with the system libgcc as
often.

In #70846, however, only part of the compiler understands that
compiler-builtins is built with many CGUs. The rest of the compiler
thinks it's building with `sess.codegen_units()`. Notably the
calculation of `sess.lto()` consults `sess.codegen_units()`, which when
there's only one CGU it disables ThinLTO. This means that
compiler-builtins is built without ThinLTO, which is quite harmful to
performance! This is the root of the cause from #73135 where intrinsics
were found to not be inlining trivial functions.

The fix applied in this commit is to remove the special-casing of
compiler-builtins in the compiler. Instead the build system is now
responsible for special-casing compiler-builtins. It doesn't know
exactly how many CGUs will be needed but it passes a large number that
is assumed to be much greater than the number of source-level modules
needed. After reading the various locations in the compiler source, this
seemed like the best solution rather than adding more and more special
casing in the compiler for compiler-builtins.

Closes #73135
2020-06-19 14:29:26 +02:00
..
bootstrap Rollup merge of #72999 - mati865:separate-self-contained-dir, r=Mark-Simulacrum 2020-06-19 08:56:04 +02:00
build_helper
ci removed try config to test mac & windows (passed) 2020-06-17 14:50:28 -07:00
doc Rollup merge of #73230 - Amanieu:asm-unused2, r=petrochenkov 2020-06-11 19:04:20 +02:00
etc Implement new gdb/lldb pretty-printers 2020-06-09 16:13:11 +03:00
liballoc Rollup merge of #73479 - pickfire:liballoc-spell, r=dtolnay 2020-06-19 08:56:19 +02:00
libcore Rollup merge of #73054 - RalfJung:dont-panic, r=Mark-Simulacrum 2020-06-19 14:29:24 +02:00
libpanic_abort
libpanic_unwind Bump to 1.46 2020-06-03 15:27:51 -04:00
libproc_macro
libprofiler_builtins
librustc_apfloat Migrate to numeric associated consts 2020-06-10 01:35:47 +00:00
librustc_arena Rollup merge of #73237 - tmiasko:arena, r=nnethercote 2020-06-16 15:08:35 +02:00
librustc_ast Fix typo in librustc_ast docs 2020-06-16 18:11:47 -07:00
librustc_ast_lowering Auto merge of #73369 - RalfJung:rollup-hl8g9zf, r=RalfJung 2020-06-15 11:39:23 +00:00
librustc_ast_passes [AVR] Add AVR platform support 2020-06-09 17:34:07 +12:00
librustc_ast_pretty Rollup merge of #73182 - Aaron1011:feature/call-fn-span, r=matthewjasper 2020-06-11 19:04:16 +02:00
librustc_attr Make things build again 2020-06-02 20:38:24 +03:00
librustc_builtin_macros Rollup merge of #73178 - petrochenkov:explint, r=varkor 2020-06-12 12:28:25 +02:00
librustc_codegen_llvm Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_codegen_ssa Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_data_structures Migrate to numeric associated consts 2020-06-10 01:35:47 +00:00
librustc_driver Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum 2020-06-06 09:00:51 +00:00
librustc_error_codes Change E0758 to E0759 to avoid conflict with #72912 2020-06-15 09:06:58 -07:00
librustc_errors track caller for delay_span_bug 2020-06-15 18:25:58 -05:00
librustc_expand Rollup merge of #73178 - petrochenkov:explint, r=varkor 2020-06-12 12:28:25 +02:00
librustc_feature Add feature gate for precise live drop checking 2020-06-13 11:05:11 -07:00
librustc_fs_util
librustc_graphviz Rename the crates in source code 2020-06-02 20:42:54 +03:00
librustc_hir Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_hir_pretty Auto merge of #72080 - matthewjasper:uniform-impl-trait, r=nikomatsakis 2020-06-15 04:10:24 +00:00
librustc_incremental Remove associated opaque types 2020-06-11 16:24:01 +01:00
librustc_index Make things build again 2020-06-02 20:38:24 +03:00
librustc_infer Rollup merge of #72804 - estebank:opaque-missing-lts-in-fn-2, r=nikomatsakis 2020-06-18 15:20:43 -07:00
librustc_interface [WIP] injects llvm intrinsic instrprof.increment for coverage reports 2020-06-15 16:50:10 -07:00
librustc_lexer Rollup merge of #72906 - lzutao:migrate-numeric-assoc-consts, r=dtolnay 2020-06-12 12:28:23 +02:00
librustc_lint Rollup merge of #72497 - RalfJung:tag-term, r=oli-obk 2020-06-19 08:56:02 +02:00
librustc_llvm [AVR] Add AVR platform support 2020-06-09 17:34:07 +12:00
librustc_macros Use min_specialization in the remaining rustc crates 2020-06-10 09:05:52 +01:00
librustc_metadata Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_middle Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_mir Rollup merge of #73136 - alexcrichton:thinlto-compiler-builtins, r=Mark-Simulacrum 2020-06-19 14:29:26 +02:00
librustc_mir_build Auto merge of #73486 - Manishearth:rollup-11iyqpc, r=Manishearth 2020-06-19 01:20:49 +00:00
librustc_parse Rollup merge of #73361 - estebank:non-primitive-cast, r=davidtwco 2020-06-18 15:20:57 -07:00
librustc_parse_format Make things build again 2020-06-02 20:38:24 +03:00
librustc_passes Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_plugin_impl
librustc_privacy make all uses of ty::Error or ConstKind::Error delay a span bug 2020-06-15 18:25:58 -05:00
librustc_query_system Use min_specialization in the remaining rustc crates 2020-06-10 09:05:52 +01:00
librustc_resolve Rollup merge of #73320 - estebank:type-param-sugg-more, r=davidtwco 2020-06-18 15:20:55 -07:00
librustc_save_analysis make all uses of ty::Error or ConstKind::Error delay a span bug 2020-06-15 18:25:58 -05:00
librustc_serialize Use min_specialization in the remaining rustc crates 2020-06-10 09:05:52 +01:00
librustc_session Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_span Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustc_symbol_mangling make all uses of ty::Error or ConstKind::Error delay a span bug 2020-06-15 18:25:58 -05:00
librustc_target Rollup merge of #72497 - RalfJung:tag-term, r=oli-obk 2020-06-19 08:56:02 +02:00
librustc_trait_selection Rollup merge of #71338 - estebank:recursive-impl-trait, r=nikomatsakis 2020-06-18 15:20:33 -07:00
librustc_traits make all uses of ty::Error or ConstKind::Error delay a span bug 2020-06-15 18:25:58 -05:00
librustc_ty Add case for count_code_region() extern lang_item 2020-06-15 16:50:10 -07:00
librustc_typeck Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
librustdoc Rollup merge of #73476 - JakobDegen:should_panic_rustdoc, r=GuillaumeGomez 2020-06-18 15:21:04 -07:00
libstd Rollup merge of #73464 - qy3u:fs-document-format-correction, r=jonas-schievink 2020-06-19 08:56:17 +02:00
libterm
libtest typo: awailable -> available 2020-06-08 13:37:58 -07:00
libunwind Rollup merge of #73187 - mati865:bootstrap-cleanup, r=Mark-Simulacrum 2020-06-12 00:05:31 +02:00
llvm-project@0ddefeca92 Update LLVM submodule 2020-06-13 19:54:09 +01:00
rtstartup
rustc
rustllvm Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry 2020-06-19 14:29:20 +02:00
stdarch@45340c0e2f Update stdarch submodule to latest head 2020-05-31 00:12:59 +02:00
test Rollup merge of #73136 - alexcrichton:thinlto-compiler-builtins, r=Mark-Simulacrum 2020-06-19 14:29:26 +02:00
tools Rollup merge of #73044 - tmiasko:compiletest-san, r=nikomatsakis 2020-06-19 14:29:22 +02:00
README.md
stage0.txt Bump to 1.46 2020-06-03 15:27:51 -04:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.