rust/src
Alex Crichton 88114f61b4 rustc: Group linked libraries where needed
This commit fixes a longstanding issue with the compiler with circular
dependencies between libcore and libstd. The `core` crate requires at least one
symbol, the ability to unwind. The `std` crate is the crate which actually
defines this symbol, but the `std` crate also depends on the `core` crate.

This circular dependency is in general disallowed in Rust as crates cannot have
cycles amongst them. A special exception is made just for core/std, but this is
also unfortunately incompatible with how GNU linkers work. GNU linkers will
process undefined symbols in a left-to-right fashion, only actually linking an
rlib like libstd if there are any symbols used from it. This strategy is
incompatible with circular dependencies because if we otherwise don't use
symbols from libstd we don't discover that we needed it until we're later
processing libcore's symbols!

To fix this GNU linkers support the `--start-group` and `--end-group` options
which indicate "libraries between these markers may have circular dependencies
amongst them. The linker invocation has been updated to automatically pass these
arguments when we're invoking a GNU linker and automatically calculate where the
arguments need to go (around libstd and libcore)

Closes #18807
Closes #47074
2018-03-29 15:07:51 -07:00
..
bootstrap rustbuild: Fail the build if we build Cargo twice 2018-03-26 13:07:12 -07:00
build_helper
ci rustbuild: Disable docs on cross-compiled builds 2018-03-25 23:31:41 -07:00
dlmalloc@9b2dcac06c
doc Auto merge of #49460 - kennytm:rollup, r=kennytm 2018-03-28 22:18:13 +00:00
etc Use GNU version of fgrep/egrep tool if available 2018-03-22 14:38:05 +01:00
grammar
jemalloc@1f5a28755e
liballoc Move RangeArguments to {core::std}::ops and rename to RangeBounds 2018-03-29 13:12:49 +02:00
liballoc_jemalloc
liballoc_system
libarena
libbacktrace
libcompiler_builtins@2a2f6d96c8 Update compiler-rt with fix for 32bit iOS ARM 2018-03-27 15:32:06 +02:00
libcore impl RangeBounds<T> for Range{,From,To,Inclusive,ToInclusive}<&T> 2018-03-29 13:12:49 +02:00
libfmt_macros Add hexadecimal formatting of integers with fmt::Debug 2018-03-13 14:53:06 +01:00
libgraphviz mir dataflow: change graphviz output 2018-03-09 13:53:35 -05:00
liblibc@ed04152aac Update libc to 0.2.39 2018-03-12 10:07:48 -07:00
libpanic_abort
libpanic_unwind
libproc_macro Stabilize i128_type 2018-03-26 08:36:50 -05:00
libprofiler_builtins pgo: Blindly try to fix Windows build. 2018-03-25 23:17:47 +02:00
librustc Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakis 2018-03-29 05:44:40 +00:00
librustc_allocator Use FunctionRetTy::Default rather than an explicit TyKind::Infer for lambda-building 2018-03-22 15:55:57 +00:00
librustc_apfloat Stabilize the TryFrom and TryInto traits 2018-03-26 23:36:02 +02:00
librustc_asan
librustc_back Add a hash when a TargetPath is displayed 2018-03-26 19:01:26 +02:00
librustc_borrowck Stabilize match_default_bindings 2018-03-28 11:13:13 +02:00
librustc_const_math Stabilize i128 feature too 2018-03-26 08:37:56 -05:00
librustc_cratesio_shim
librustc_data_structures Move RangeArguments to {core::std}::ops and rename to RangeBounds 2018-03-29 13:12:49 +02:00
librustc_driver Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakis 2018-03-29 05:44:40 +00:00
librustc_errors Stabilize i128_type 2018-03-26 08:36:50 -05:00
librustc_incremental Rollup merge of #49364 - wesleywiser:incr_handle_load_failure, r=michaelwoerister 2018-03-28 17:55:08 +02:00
librustc_lint Stabilize i128_type 2018-03-26 08:36:50 -05:00
librustc_llvm Auto merge of #49249 - gnzlbg:simd_minmax, r=alexcrichton 2018-03-27 04:46:32 +00:00
librustc_lsan
librustc_metadata Auto merge of #49019 - phil-opp:target-spec, r=pnkfelix 2018-03-28 12:56:09 +00:00
librustc_mir Stabilize underscore lifetimes 2018-03-29 00:27:50 +02:00
librustc_msan
librustc_passes Auto merge of #48482 - davidtwco:issue-47184, r=nikomatsakis 2018-03-24 02:08:22 +00:00
librustc_platform_intrinsics
librustc_plugin Auto merge of #48524 - abonander:check-macro-stability, r=petrochenkov 2018-03-16 02:46:23 +00:00
librustc_privacy Replace Rc with Lrc for shared data 2018-03-02 10:48:52 +01:00
librustc_resolve Auto merge of #49101 - mark-i-m:stabilize_i128, r=nagisa 2018-03-26 18:41:38 +00:00
librustc_save_analysis Rename Span::empty to Span::shrink_to_lo, add Span::shrink_to_hi 2018-03-17 22:12:21 +03:00
librustc_traits Stabilize underscore lifetimes 2018-03-29 00:27:50 +02:00
librustc_trans rustc: Group linked libraries where needed 2018-03-29 15:07:51 -07:00
librustc_trans_utils Stabilize i128_type 2018-03-26 08:36:50 -05:00
librustc_tsan
librustc_typeck Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakis 2018-03-29 05:44:40 +00:00
librustdoc Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakis 2018-03-29 05:44:40 +00:00
libserialize Stabilize i128_type 2018-03-26 08:36:50 -05:00
libstd Hide the Bound type in docs at its deprecated location in std::collections 2018-03-29 13:12:50 +02:00
libstd_unicode Stabilize the TryFrom and TryInto traits 2018-03-26 23:36:02 +02:00
libsyntax Stabilize underscore lifetimes 2018-03-29 00:27:50 +02:00
libsyntax_ext Auto merge of #49279 - varkor:generated-closure-return-type, r=alexcrichton 2018-03-27 07:16:29 +00:00
libsyntax_pos Stabilize i128_type 2018-03-26 08:36:50 -05:00
libterm
libtest Cargo fmt libtest 2018-03-21 23:12:24 +09:00
libunwind
llvm@6ceaaa4b01 Merge LLVM fix for undefined bss globals 2018-03-10 12:38:41 +00:00
llvm-emscripten@2717444753
rtstartup
rustc
rustllvm Enable target_feature on any LLVM 6+ 2018-03-27 12:27:45 -07:00
stdsimd@bcb720e558 update stdsimd 2018-03-21 15:43:06 -05:00
test rustc: Group linked libraries where needed 2018-03-29 15:07:51 -07:00
tools Update clippy 2018-03-29 13:13:49 +02:00
Cargo.lock Update Cargo 2018-03-29 10:35:15 +03:00
Cargo.toml Automatically enable the clippy feature of rls if clippy builds 2018-03-16 18:24:08 +01:00
README.md
stage0.txt Update beta to version with fixed FreeBSD support from #49023. 2018-03-19 12:40:42 -07: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 guide.

Their is also useful content in the following READMEs, which are gradually being moved over to the guide: