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

Turn off debuginfo for build dependencies v2 #11252

Merged
merged 17 commits into from Feb 2, 2023

Commits on Jan 31, 2023

  1. introduce dedicated DebugInfo enum in Profiles

    This enum will be used to model the current Option<u32> value in
    profiles, as the explicitly set value, and also allow to model a
    deferred value: one that can be ignored for optimization purposes,
    and used in all other cases.
    
    This allows to have a default debuginfo for build dependencies, that can
    change:
    - if a dependency is shared between the build and runtime subgraphs, the
      default value will be used, to that re-use between units will
      continue.
    - otherwise, a build dependency is only used in a context where
      debuginfo is not very useful. We can optimize build times in this
      situation by not asking rustc to emit debuginfo.
    lqd committed Jan 31, 2023
    Copy the full SHA
    79dd511 View commit details
    Browse the repository at this point in the history
  2. optimize build dependency debuginfo level

    When a build dependency unit is not within the runtime dependency
    subgraph, we don't ask for debuginfo to be emitted by default.
    lqd committed Jan 31, 2023
    Copy the full SHA
    75af7a4 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    6848006 View commit details
    Browse the repository at this point in the history
  4. clean up destructuring assignment

    Removes a fixme
    lqd committed Jan 31, 2023
    Copy the full SHA
    7fb97c5 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    cec1245 View commit details
    Browse the repository at this point in the history
  6. improve comments

    lqd committed Jan 31, 2023
    Copy the full SHA
    937a08c View commit details
    Browse the repository at this point in the history
  7. display note to increase debuginfo level when build deps fail

    it's only displayed when backtraces are requested
    lqd committed Jan 31, 2023
    Copy the full SHA
    881533b View commit details
    Browse the repository at this point in the history
  8. add build script failure test when requesting backtraces

    it displays an additional message on how to improve these backtraces, now that
    debuginfo is turned off most of the time in `dev.build-override`.
    lqd committed Jan 31, 2023
    Copy the full SHA
    7dfabdc View commit details
    Browse the repository at this point in the history
  9. update build dependencies profiles documentation

    This describes the new defaults for build-overrides, and how to make sure backtraces have the usual debug info, when needed.
    lqd committed Jan 31, 2023
    Copy the full SHA
    4362b1b View commit details
    Browse the repository at this point in the history
  10. add assertions checking the absence of debuginfo

    Add some assertions to ensure that debuginfo is not used to compile
    build dependencies, in a way that differs between the old and new
    defaults: some of the assert elision could match the previous defaults
    with debuginfo. These new assertions break if `-C debuginfo` is present
    in the commands cargo ran.
    lqd committed Jan 31, 2023
    Copy the full SHA
    facdb30 View commit details
    Browse the repository at this point in the history
  11. derive Serialize for DebugInfo

    lqd committed Jan 31, 2023
    Copy the full SHA
    6c43053 View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    d7732e4 View commit details
    Browse the repository at this point in the history
  13. use UnitFor::is_for_host to detect build deps

    Although `CompileKind::is_host` is currently used for build dependencies prior
    to unit graph sharing, it's not a guarantee. So we use `UnitFor::is_for_host`
    to make detection more future-proof.
    lqd committed Jan 31, 2023
    Copy the full SHA
    49bd6ac View commit details
    Browse the repository at this point in the history
  14. update optional_build_dep_and_required_normal_dep test expectations

    This test dynamically enables a shared build/runtime dependency, and
    therefore doesn't trigger the build/runtime sharing reuse optimization,
    as the build dep is initially built without debuginfo for optimization
    purposes.
    lqd committed Jan 31, 2023
    Copy the full SHA
    3be6c93 View commit details
    Browse the repository at this point in the history
  15. update test proc_macro_ws

    This non-regression test didn't pass as-is because of the new debuginfo
    build deps optimization. This restores the original intent of the test.
    lqd committed Jan 31, 2023
    Copy the full SHA
    2bfc813 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    9d9b7fe View commit details
    Browse the repository at this point in the history
  17. Copy the full SHA
    7ccda69 View commit details
    Browse the repository at this point in the history