-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Add --compile-time-deps argument for x check #143785
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
Conversation
r? @clubby789 rustbot has assigned @clubby789. Use |
This PR modifies If appropriate, please update |
dc7dab3
to
6f2d900
Compare
This reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m34s when the bootstrap compiler is already downloaded.
6f2d900
to
3fe3edb
Compare
This saves about 30s.
r? @Kobzol I don't use RA much, so could you please walk me through what exactly this does? I know that RA/RustRover wanted this flag to only compile proc macros and compile + run build scripts to speed up the initial analysis of the crate. In RustRover it's not that critical, because it caches stuff heavily. If I understand it correctly, RA doesn't cache stuff between executions, so if you reopen the rustc project, it has to do |
Basically you're correct but there are two things to clarify:
|
I see. So it only helps if you open RA after clearing the |
Yes
That would hurt working on things other than rustc, like clippy, miri or rustfmt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a change_tracker.rs
entry with Info
level about this?
df124d1
to
ccc302b
Compare
Thanks! You can r=me once CI is green. |
@bors r=Kobzol |
…d, r=Kobzol Add --compile-time-deps argument for x check Together with skipping building C++ code in rustc_llvm for check, this reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m06s when the bootstrap compiler is already downloaded.
Rollup of 14 pull requests Successful merges: - #143301 (`tests/ui`: A New Order [26/N]) - #143461 (make `cfg_select` a builtin macro) - #143519 (Check assoc consts and tys later like assoc fns) - #143554 (slice: Mark `rotate_left`, `rotate_right` unstably const) - #143634 (interpret/allocation: expose init + write_wildcards on a range) - #143679 (Preserve the .debug_gdb_scripts section) - #143685 (Resolve: merge `source_bindings` and `target_bindings` into `bindings`) - #143704 (Be a bit more careful around exotic cycles in in the inliner) - #143734 (Refactor resolve resolution bindings) - #143774 (constify `From` and `Into`) - #143785 (Add --compile-time-deps argument for x check) - #143786 (Fix fallback for CI_JOB_NAME) - #143825 (clippy: fix test filtering when TESTNAME is empty) - #143826 (Fix command trace) r? `@ghost` `@rustbot` modify labels: rollup
…d, r=Kobzol Add --compile-time-deps argument for x check Together with skipping building C++ code in rustc_llvm for check, this reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m06s when the bootstrap compiler is already downloaded.
Rollup of 13 pull requests Successful merges: - #143301 (`tests/ui`: A New Order [26/N]) - #143461 (make `cfg_select` a builtin macro) - #143519 (Check assoc consts and tys later like assoc fns) - #143554 (slice: Mark `rotate_left`, `rotate_right` unstably const) - #143634 (interpret/allocation: expose init + write_wildcards on a range) - #143679 (Preserve the .debug_gdb_scripts section) - #143685 (Resolve: merge `source_bindings` and `target_bindings` into `bindings`) - #143734 (Refactor resolve resolution bindings) - #143774 (constify `From` and `Into`) - #143785 (Add --compile-time-deps argument for x check) - #143786 (Fix fallback for CI_JOB_NAME) - #143825 (clippy: fix test filtering when TESTNAME is empty) - #143826 (Fix command trace) r? `@ghost` `@rustbot` modify labels: rollup
…d, r=Kobzol Add --compile-time-deps argument for x check Together with skipping building C++ code in rustc_llvm for check, this reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m06s when the bootstrap compiler is already downloaded.
Rollup of 11 pull requests Successful merges: - #143301 (`tests/ui`: A New Order [26/N]) - #143519 (Check assoc consts and tys later like assoc fns) - #143554 (slice: Mark `rotate_left`, `rotate_right` unstably const) - #143634 (interpret/allocation: expose init + write_wildcards on a range) - #143685 (Resolve: merge `source_bindings` and `target_bindings` into `bindings`) - #143734 (Refactor resolve resolution bindings) - #143774 (constify `From` and `Into`) - #143785 (Add --compile-time-deps argument for x check) - #143786 (Fix fallback for CI_JOB_NAME) - #143825 (clippy: fix test filtering when TESTNAME is empty) - #143826 (Fix command trace) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143785 - bjorn3:faster_ra_build_script_build, r=Kobzol Add --compile-time-deps argument for x check Together with skipping building C++ code in rustc_llvm for check, this reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m06s when the bootstrap compiler is already downloaded.
Rollup of 11 pull requests Successful merges: - rust-lang/rust#143301 (`tests/ui`: A New Order [26/N]) - rust-lang/rust#143519 (Check assoc consts and tys later like assoc fns) - rust-lang/rust#143554 (slice: Mark `rotate_left`, `rotate_right` unstably const) - rust-lang/rust#143634 (interpret/allocation: expose init + write_wildcards on a range) - rust-lang/rust#143685 (Resolve: merge `source_bindings` and `target_bindings` into `bindings`) - rust-lang/rust#143734 (Refactor resolve resolution bindings) - rust-lang/rust#143774 (constify `From` and `Into`) - rust-lang/rust#143785 (Add --compile-time-deps argument for x check) - rust-lang/rust#143786 (Fix fallback for CI_JOB_NAME) - rust-lang/rust#143825 (clippy: fix test filtering when TESTNAME is empty) - rust-lang/rust#143826 (Fix command trace) r? `@ghost` `@rustbot` modify labels: rollup
# tidy-alphabetical-end | ||
|
||
[features] | ||
# Used by ./x.py check --compile-time-deps to skip building C++ code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this only set with compile-time-deps? A regular check build also doesn't need the LLVM libraries, does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To not change existing behavior for ./x.py check
. If this is also set for ./x.py check
, that will no longer check if all C++ source files compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, fair... I never change those files so it's kind of unnecessary, but then the same is true for the Rust files in rustc_llvm. But those ofc check a lot faster than they build whereas the C++ files always do a full build :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #146596 you may be able to disable the LLVM backend entirely for stage 1 builds if ./x.py miri
were to use the bootstrap compiler for building the build scripts of the standard library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, funky. But most of the time I do need codegen as well (even Miri does, for build scripts and proc macros -- not sure if those can just use a different stage).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When bootstrap builds the standard library it uses different stages for build scripts and for the standard library itself. This does use a wrapper around rustc though.
Together with skipping building C++ code in rustc_llvm for check, this reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m06s when the bootstrap compiler is already downloaded.