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

Rollup of 8 pull requests #89659

Merged
merged 23 commits into from
Oct 8, 2021
Merged

Commits on Aug 18, 2021

  1. On macOS, make strip="symbols" not pass any options to strip

    This makes the output with `strip="symbols"` match the result of just
    calling `strip` on the output binary, minimizing the size of the binary.
    joshtriplett committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    ff697c6 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2021

  1. Configuration menu
    Copy the full SHA
    142f6c0 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2021

  1. Implement rust-lang#85440

    smoelius committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    fa23d4f View commit details
    Browse the repository at this point in the history
  2. Add tests

    smoelius committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    a6738c7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    32b6ac5 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2021

  1. Add documentation

    smoelius committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    e16e15f View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2021

  1. Add tracking issue

    smoelius committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    ecf4741 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c3dfda0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce21756 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    daf8903 View commit details
    Browse the repository at this point in the history
  5. Do not ICE if some foreign expansions were not encoded.

    The metadata encoder does not necessarily encode all expansions, only
    those which are referenced in other metadata fields.
    cjgillot committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    4028b09 View commit details
    Browse the repository at this point in the history
  6. Enable AutoFDO.

    This largely involves implementing the options debug-info-for-profiling
    and profile-sample-use and forwarding them on to LLVM.
    
    AutoFDO can be used on x86-64 Linux like this:
    rustc -O -Cdebug-info-for-profiling main.rs -o main
    perf record -b ./main
    create_llvm_prof --binary=main --out=code.prof
    rustc -O -Cprofile-sample-use=code.prof main.rs -o main2
    
    Now `main2` will have feedback directed optimization applied to it.
    
    The create_llvm_prof tool can be obtained from this github repository:
    https://github.com/google/autofdo
    
    Fixes rust-lang#64892.
    mikebenfield committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    a17193d View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2021

  1. Configuration menu
    Copy the full SHA
    afe5335 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fcd9fa9 View commit details
    Browse the repository at this point in the history
  3. Add wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavor

    The wrapper is installed as `ld` and `ld64` in the `lib\rustlib\<host_target>\bin\gcc-ld`
    directory and its sole purpose is to invoke `rust-lld` in the parent directory with
    the correct flavor.
    hkratz committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    6162fc0 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2021

  1. Rollup merge of rust-lang#87918 - mikebenfield:pr-afdo, r=nikic

    Enable AutoFDO.
    
    This largely involves implementing the options debug-info-for-profiling
    and profile-sample-use and forwarding them on to LLVM.
    
    AutoFDO can be used on x86-64 Linux like this:
    rustc -O -Clink-arg='Wl,--no-rosegment' -Cdebug-info-for-profiling main.rs -o main
    perf record -b ./main
    create_llvm_prof --binary=main --out=code.prof
    rustc -O -Cprofile-sample-use=code.prof main.rs -o main2
    
    Now `main2` will have feedback directed optimization applied to it.
    
    The create_llvm_prof tool can be obtained from this github repository:
    https://github.com/google/autofdo
    
    The option -Clink-arg='Wl,--no-rosegment' is necessary to avoid lld
    putting an extra RO segment before the executable code, which would make
    the binary silently incompatible with create_llvm_prof.
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    6c2d4bf View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#88137 - joshtriplett:osx-strip-symbols-no-o…

    …ption, r=michaelwoerister
    
    On macOS, make strip="symbols" not pass any options to strip
    
    This makes the output with `strip="symbols"` match the result of just
    calling `strip` on the output binary, minimizing the size of the binary.
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    cbb561f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#88772 - orlp:result-map-or-else-docfix, r=y…

    …aahc
    
    Fixed confusing wording on Result::map_or_else.
    
    Fixes rust-lang#88195.
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    2b6d7f7 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#89025 - ricobbe:raw-dylib-link-ordinal, r=m…

    …ichaelwoerister
    
    Implement `#[link_ordinal(n)]`
    
    Allows the use of `#[link_ordinal(n)]` with `#[link(kind = "raw-dylib")]`, allowing Rust to link against DLLs that export symbols by ordinal rather than by name.  As long as the ordinal matches, the name of the function in Rust is not required to match the name of the corresponding function in the exporting DLL.
    
    Part of rust-lang#58713.
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    6c17601 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#89082 - smoelius:master, r=kennytm

    Implement rust-lang#85440 (Random test ordering)
    
    This PR adds `--shuffle` and `--shuffle-seed` options to `libtest`. The options are similar to the [`-shuffle` option](https://github.com/golang/go/blob/c894b442d1e5e150ad33fa3ce13dbfab1c037b3a/src/testing/testing.go#L1482-L1499) that was recently added to Go.
    
    Here are the relevant parts of the help message:
    ```
            --shuffle       Run tests in random order
            --shuffle-seed SEED
                            Run tests in random order; seed the random number
                            generator with SEED
    ...
    By default, the tests are run in alphabetical order. Use --shuffle or set
    RUST_TEST_SHUFFLE to run the tests in random order. Pass the generated
    "shuffle seed" to --shuffle-seed (or set RUST_TEST_SHUFFLE_SEED) to run the
    tests in the same order again. Note that --shuffle and --shuffle-seed do not
    affect whether the tests are run in parallel.
    ```
    Is an RFC needed for this?
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    37f17bc View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#89288 - rusticstuff:lld_wrapper, r=Mark-Sim…

    …ulacrum
    
    Wrapper for `-Z gcc-ld=lld` to invoke rust-lld with the correct flavor
    
    This PR adds an `lld-wrapper` tool which is installed as `ld` and `ld64` in `lib\rustlib\<host_target>\bin\gcc-ld` directory and whose sole purpose is to invoke `rust-lld` in the parent directory with the correct flavor. Lld decides which flavor to use from either the first two commandline arguments or from the name of the executable (`ld` for GNU/ld flavor, `ld64` for Darwin/Macos/ld64 flavor and so on). Symbolic links could not be used as they are not supported by rustup and on Windows.
    
    The wrapper replaces full copies of rust-lld which added some significant bloat. On UNIXish operating systems it exec rust-lld, on Windows it spawns it as a child process.
    
    Fixes rust-lang#88869.
    
    r? ```@Mark-Simulacrum```
    cc ```@nagisa``` ```@petrochenkov``` ```@1000teslas```
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    1c1c6ed View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#89476 - cjgillot:expn-id, r=petrochenkov

    Correct decoding of foreign expansions during incr. comp.
    
    Fixes rust-lang#74946
    
    The original issue was due to a wrong assertion in `expn_hash_to_expn_id`.
    
    The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    aed1801 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#89622 - m-ou-se:debug-assert-2021, r=estebank

    Use correct edition for panic in [debug_]assert!().
    
    See rust-lang#88638 (comment)
    workingjubilee committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    30e068f View commit details
    Browse the repository at this point in the history