Change:
With the latest , when I run a run-make test twice in a row, bootstrap rebuilds and : This has to be a recent regression, it didn't happen until ~yesterday. Confirmed with that it also happens for them.
Sounds suspiciously similar to
Yeah this is again caused by being enabled :laughing: Do you think that there's some more general solution to the rebuild problem?
Thanks for notifying me about this. I am travelling this weekend, meaning i might not have a chance to thoroughly investigate before Monday. (But I will at the latest be able to look on Monday). The last time it was due to dependency on the same crates with different rustflags. One from llbc-linker and one from some other tool (rustdoc?). The two different invocations maps to the same cache entry but is invalid between each other and thus triggers a rebuild. The solution last time was to mimic the rustflags being used other places in llbc-linker. That might be a good short term solution now as well. I don't know about the long term solution but it seems like either caching multiple versions of a crate or unifying the rustflag somewhere might be alternatives?
Of course, there's no rush, I just wanted to let you know, given that you already have some experience in debugging this :laughing: This seems rather brittle though, as you mention. I wonder what's so unique about this tool that it causes these rebuilds so often. You mentioned that we cannot share flags between all Step invocations. But maybe it would make sense to better share flags between at least this tool and other steps, rather than hardcoding selected flags? (as was done last time with the parallel compiler).
Actually, I wonder if we really need to enable this linker by default in all four bootstrap profiles.
Sure, seems fine to me. I didn't expect it to be a problem this frequently.
posted instead to disable this flag by default, I don't think it should be enabled for most contributors.

Discussion:
# whether to set it as rustc's default linker on `x86_64-unknown-linux-gnu`. This will also only be # when *not* building an external LLVM (so only when using `download-ci-llvm` or building LLVM from # the in-tree source): setting `llvm-config` in the `[target.x86_64-unknown-linux-gnu]` section will <del> # make this default to false. </del> <ins> # make this default to false. </ins> #lld = false in all cases, except on `x86_64-unknown-linux-gnu` as described above, where it is true # Indicates whether LLD will be used to link Rust crates during bootstrap on

#llvm-tools = true # Indicates whether the `self-contained` llvm-bitcode-linker, will be made available <del> # in the sysroot </del> <ins> # in the sysroot. It is required for running nvptx tests. </ins> #llvm-bitcode-linker = false # Whether to deny warnings in crates

# Forces frame pointers to be used with `-Cforce-frame-pointers`. # This can be helpful for profiling at a small performance cost. frame-pointers = true <del> # Build the llvm-bitcode-linker as it is required for running nvptx tests llvm-bitcode-linker = true </del> [llvm] # Having this set to true disrupts compiler development workflows for people who use `llvm.download-ci-llvm = true`

# Make sure they don't get set when installing from source. channel = "nightly" download-rustc = false <del> # Build the llvm-bitcode-linker as it is required for running nvptx tests </del> <ins> # Build the llvm-bitcode-linker </ins> llvm-bitcode-linker = true [dist]

incremental = true # Make the compiler and standard library faster to build, at the expense of a ~20% runtime slowdown. lto = "off" <del> # Build the llvm-bitcode-linker as it is required for running nvptx tests llvm-bitcode-linker = true </del> [llvm] # Will download LLVM from CI if available on your platform.

# Using these defaults will download the stage2 compiler (see `download-rustc` # setting) and the stage2 toolchain should therefore be used for these defaults. download-rustc = "if-unchanged" <del> # Build the llvm-bitcode-linker as it is required for running nvptx tests llvm-bitcode-linker = true </del> [build] # Document with the in-tree rustdoc by default, since `download-rustc` makes it quick to compile.