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

Move LLVM bitcode destination #70458

Closed

Commits on Apr 16, 2020

  1. Remove BitcodeSection::Marker.

    It existed to minimize compile time of debug builds, but the subsequent
    commits in rust-lang#70458 and corresponding changes to Cargo mean that bitcode
    will be omitted in most cases anyway.
    
    As a result, we just embed full bitcode whenever embedded bitcode is
    necessary.
    
    This commit also removes `BitcodeSection`, using just a `bool` instead
    now to indicate the presence of bitcode in an object file.
    nnethercote committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    7851670 View commit details
    Browse the repository at this point in the history
  2. Promote -Zembed-bitcode to -Cembed-bitcode and default to true.

    This means that bitcode embedding now occurs by default. Subsequent
    commits in this PR will remove the production of compressed bitcode in
    rlibs, and Cargo will soon start using this flag to avoid bitcode
    embedding when it's not necessary, which is most of the time.
    
    Also, produce an early error if `-Cembed-bitcode=no` is used with
    `-Clto`.
    nnethercote committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    d89f03f View commit details
    Browse the repository at this point in the history
  3. Use embedded bitcode for LTO.

    Instead of `.bc.z` files. This requires adding some code that calls into
    LLVM to find the bitcode section within an object file. The name
    used for the LTO module is now the full filename, rather than a
    substring of the filename, which accounts for one test change.
    nnethercote committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    7ae716f View commit details
    Browse the repository at this point in the history
  4. Remove .bc.z files.

    These were needed for LTO, but LTO now uses bitcode embedded in `.o`
    files.
    nnethercote committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    0d2cd69 View commit details
    Browse the repository at this point in the history
  5. Don't copy bytecode files into the incr. comp. cache.

    It's no longer necessary now that bitcode is embedded into object files.
    
    This change meant that `WorkProductFileKind::Bytecode` is no longer
    necessary, which means that type is no longer necessary, which allowed
    several places in the code to become simpler.
    nnethercote committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    f2680fc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8b1fc0e View commit details
    Browse the repository at this point in the history
  7. Build libstd with -Cembed-bitcode=yes.

    So that the artifacts will work with both LTO and non-LTO builds.
    nnethercote committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    2c18cc1 View commit details
    Browse the repository at this point in the history
  8. Update llvm-project.

    In order to get rust-lang/llvm-project#48, which is needed for wasm to
    work in this PR (rust-lang#70458).
    nnethercote committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    f86c8aa View commit details
    Browse the repository at this point in the history