1. 05 7月, 2022 1 次提交
  2. 04 7月, 2022 4 次提交
  3. 03 7月, 2022 4 次提交
  4. 01 7月, 2022 5 次提交
  5. 29 6月, 2022 1 次提交
  6. 28 6月, 2022 3 次提交
  7. 27 6月, 2022 1 次提交
  8. 26 6月, 2022 3 次提交
  9. 25 6月, 2022 1 次提交
  10. 22 6月, 2022 3 次提交
    • J
      Remove vendoring support when building from git sources · 345eb14f
      Joshua Nelson 提交于
      This is difficult to support without submodule handling in bootstrap.py, because cargo will refuse
      to vendor sources unless it knows the Cargo.toml files of all tools in tree. Moving vendor support
      to rustbuild means that rustbuild will be built without vendoring.
      
      Rather than trying to solve this, just remove support altogether and require
      people to use `rustc-src` if they want vendoring (or run `cargo vendor` manually).
      345eb14f
    • J
      Add bootstrap to tidy check · 85c87f6c
      Joshua Nelson 提交于
      85c87f6c
    • J
      Fully remove submodule handling from bootstrap.py · 9cde0f78
      Joshua Nelson 提交于
      These submodules were previously updated in python because Cargo gives a hard error if toml files
      are missing from the workspace:
      
      ```
      error: failed to load manifest for workspace member `/home/jnelson/rust-lang/rust/src/tools/rls`
      
      Caused by:
        failed to read `/home/jnelson/rust-lang/rust/src/tools/rls/Cargo.toml`
      
      Caused by:
        No such file or directory (os error 2)
      failed to run: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/jnelson/rust-lang/rust/src/bootstrap/Cargo.toml
      ```
      
      However, bootstrap doesn't actually need to be part of the workspace.
      Remove it so we can move submodule handling fully to Rust, avoiding duplicate code between Rust and Python.
      
      Note that this does break `cargo run`; it has to be `cd src/bootstrap && cargo run` now.
      Given that we're planning to make the main entrypoint a shell script (or rust binary),
      I think this is a good tradeoff for reduced complexity in bootstrap.py.
      9cde0f78
  11. 20 6月, 2022 2 次提交
    • J
      Make "Assemble stage1 compiler" orders of magnitude faster · 057eab7a
      Joshua Nelson 提交于
      This used to take upwards of 5 seconds for me locally. I found that the
      culprit was copying the downloaded LLVM shared object:
      ```
      [22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so"
      [22:28:09]   c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } }
      ```
      
      It turned out that `install()` used full copies unconditionally. Change
      it to use `copy()` internally, which uses hard links instead when
      available.
      
      Note that this has a change in behavior: Installing a file will also
      change permissions on the source, not just the destination, if hard
      links are used.
      
      To avoid changing the behavior on symlinks for existing code, I
      introduce a new function `copy_internal` which only dereferences
      symlinks when told to do so.
      057eab7a
    • J
      Panic if `dist` generates a symbolic link in a generated tarball · b9eedea4
      Joshua Nelson 提交于
      This avoids regressions in rustup-toolchain-install-master
      b9eedea4
  12. 18 6月, 2022 2 次提交
    • J
      Add tests for fixed bugs · fca6dbd9
      Joshua Nelson 提交于
      fca6dbd9
    • J
      Pass all paths to `Step::run` at once when using `ShouldRun::krate` · 0da0a219
      Joshua Nelson 提交于
      This was surprisingly complicated. The main changes are:
      1. Invert the order of iteration in `StepDescription::run`.
      
          Previously, it did something like:
          ```python
          for path in paths:
          for (step, should_run) in should_runs:
              if let Some(set) = should_run.pathset_for_path(path):
              step.run(builder, set)
          ```
      
          That worked ok for individual paths, but didn't allow passing more than one path at a time to `Step::run`
          (since `pathset_for_paths` only had one path available to it).
          Change it to instead look at the intersection of `paths` and `should_run.paths`:
      
          ```python
          for (step, should_run) in should_runs:
          if let Some(set) = should_run.pathset_for_paths(paths):
              step.run(builder, set)
          ```
      
      2. Change `pathset_for_path` to take multiple pathsets.
      
          The goal is to avoid `x test library/alloc` testing *all* library crates, instead of just alloc.
          The changes here are similarly subtle, to use the intersection between the paths rather than all
          paths in `should_run.paths`. I added a test for the behavior to try and make it more clear.
      
          Note that we use pathsets instead of just paths to allow for sets with multiple aliases (*cough* `all_krates` *cough*).
          See the documentation added in the next commit for more detail.
      
      3. Change `StepDescription::run` to explicitly handle 0 paths.
      
         Before this was implicitly handled by the `for` loop, which just didn't excute when there were no paths.
         Now it needs a check, to avoid trying to run all steps (this is a problem for steps that use `default_condition`).
      
      4. Change `RunDescription` to have a list of pathsets, rather than a single path.
      
      5. Remove paths as they're matched
      
         This allows checking at the end that no invalid paths are left over.
         Note that if two steps matched the same path, this will no longer run both;
         but that's a bug anyway.
      
      6. Handle suite paths separately from regular sets.
      
         Running multiple suite paths at once instead of in separate `make_run` invocations is both tricky and not particularly useful.
         The respective test Steps already handle this by introspecting the original paths.
      
         Avoid having to deal with it by moving suite handling into a seperate loop than `PathSet::Set` checks.
      0da0a219
  13. 16 6月, 2022 1 次提交
    • E
      Make #[cfg(bootstrap)] not error in proc macros on later stages · 471fa05f
      est31 提交于
      As was discovered in https://github.com/rust-lang/rust/pull/93628#issuecomment-1154697627 ,
      adding #[cfg(bootstrap)] to a rust-internal proc macro crate
      would yield an unexpected cfg name error, at least on later
      stages wher the bootstrap cfg arg wasn't set.
      
      rustc already passes arguments to mark bootstrap as expected,
      however the means of delivery through the RUSTFLAGS env var
      is unable to reach proc macro crates, as described
      in the issue linked in the code this commit touches.
      
      This wouldn't be an issue for cfg args that get passed through
      RUSTFLAGS, as they would never become *active* either, so
      any usage of one of these flags in a proc macro's code would
      legitimately yield a lint warning. But since dc302587,
      rust takes extra measures to pass --cfg=bootstrap even in
      proc macros, by passing it via the wrapper. Thus, we need
      to send the flags to mark bootstrap as expected also from the
      wrapper, so that #[cfg(bootstrap)] also works from proc macros.
      
      I want to thank Urgau and jplatte for helping me find the cause of this. 
      471fa05f
  14. 14 6月, 2022 1 次提交
  15. 13 6月, 2022 3 次提交
  16. 10 6月, 2022 3 次提交
  17. 09 6月, 2022 2 次提交