Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[beta] Backport #74085

Closed
wants to merge 4 commits into from
Closed

[beta] Backport #74085

wants to merge 4 commits into from

Commits on Jul 6, 2020

  1. Configuration menu
    Copy the full SHA
    86b0f14 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2804236 View commit details
    Browse the repository at this point in the history
  3. rustdoc: Fix doc aliases with crate filtering

    Fix a crash when searching for an alias contained in the currently selected filter crate.
    
    Also remove alias search results for crates that should be filtered out.
    
    The test suite needed to be fixed to actually take into account the crate filtering and check that there are no results when none are expected.
    ollie27 authored and Elinvynia committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    9785a60 View commit details
    Browse the repository at this point in the history
  4. 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
    alexcrichton authored and Elinvynia committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    250af0a View commit details
    Browse the repository at this point in the history