applying /Brepro in bootstrap on MSVC and adding a run-make test. - #158873
Conversation
|
cc @tgross35 |
This comment has been minimized.
This comment has been minimized.
|
oh no |
|
Whatever the goal is here, would it be possible to write a run-make test that uses gimli/object to check this? Exact binary contents tend to be a bit fragile, as illustrated here... |
|
Also is there any interaction with trim-paths? #111540 |
|
(a) for the test, i'll investigate if i can write a run-make test that inspects the relevant PE/COFF metadata using |
|
There seems to be some serious downsides to using If we do enable it, we probably want to enable it only if Let's ping some of our Windows target maintainer on this matter, @ChrisDenton @dpaoliello @Fulgen301 @lambdageek. Footnotes |
|
Buck2 seems to enable it unconditionally, but they also disable incremental linking. |
|
oh i didn't know that :'(, i'll read those linked pages and wait for target maintainers for their approaches too |
|
I'm not a fan:
I also don't think such major changes should be done in a PR; this should be a Major Change Proposal at the minimum and / or integrate with existing efforts for reproducible builds. |
and will move this out of debuginfo fn regardless. |
|
cc @bjorn3 |
|
The above discussion makes it seem to me like we shouldn't enable it by default inside rustc itself, but could make bootstrap pass it when building everything. We don't use incremental linking for rustc itself anyway. |
|
then i'll get to it now, thanks :-) |
Both; That's only about all Windows programs in the wild though; enabling it for only rustc should be fine, like bjorn said. |
|
If we did want to more directly support this outside of rustc itself then think it would be better to have it be a cargo option or subcommand. Reproducible builds are not something that needs to be implicit and it requires setting more than just |
|
just want to make sure i understand correctly: you are saying the narrow "bootstrap passes |
Yes, absolutely. My only point was that reproducible builds are ultimately a build system concern and bootstrap is the build system for rustc so it definitely makes sense to put it there. |
|
checked the interaction directly: |
|
applied |
|
(i hadn't removed this pr's change in my local clone, thats why the |
This comment has been minimized.
This comment has been minimized.
is it because of msvc not being msvc or msvc* something like that |
|
@bors try jobs=msvc |
This comment has been minimized.
This comment has been minimized.
applying `/Brepro` in bootstrap on MSVC and adding a run-make test. try-job: *msvc*
|
its done :D |
|
@Fulgen301 could you take a look at the PR? I don't access to a Windows machine, and this is pretty Windows specific. |
|
GitHub did not report the pings at all, yay... |
There was a problem hiding this comment.
This should also look at the TimeDateStamp field in the COFF file header, currently it only looks at the debug section.
There was a problem hiding this comment.
whoops, i'll include that
There was a problem hiding this comment.
done
x86_64-pc-windows-msvc and i686-pc-windows-msvc; both pass locally too
9ab4a96 to
ae29b37
Compare
|
need a msvc bors run on this |
|
@bors try jobs=msvc |
This comment has been minimized.
This comment has been minimized.
applying `/Brepro` in bootstrap on MSVC and adding a run-make test. try-job: *msvc*
|
cc @Urgau @Fulgen301 |
…uwer Rollup of 14 pull requests Successful merges: - #160009 (`rust-analyzer` subtree update) - #159833 (ci: Make the `x86_64-gnu-parallel-frontend` job non-optional) - #158873 (applying `/Brepro` in bootstrap on MSVC and adding a run-make test.) - #159777 (Enforce that we don't generate code for comptime fns) - #159997 (On many bindings with move error, limit the number of `Span`s) - #158205 (fix: defer const normalize in coherence mode) - #159312 (Windows implementation for stdio set/take/replace) - #159772 (Fix lowering of resolved const inference variables) - #159785 (Share _Unwind_Exception definition between native and wasm) - #159968 (Fix the const impl suggestion) - #159974 (Update thinvec to 0.2.19) - #160013 (tests/ui: Ignore one query cycle test in parallel frontend mode) - #160016 (compiletest: do not talk about JSON when the user never sees any) - #160018 (test suite: add ARM case to ABI-required target feature check for -Ctarget-cpu)
|
yay (/≧▽≦)/ |
Rollup merge of #158873 - paradoxicalguy:brepro-msvc, r=ChrisDenton applying `/Brepro` in bootstrap on MSVC and adding a run-make test. as per the discussion, this PR applies `/Brepro` only for bootstrap when building `rustc` on `MSVC`, rather than enabling it for all Rust binaries. it also adds a `run-make` test that compiles a small `PE executable`, parses its `IMAGE_DEBUG_DIRECTORY` using the `object` crate, and verifies that `TimeDateStamp` values remain identical across repeated `/Brepro` builds. r?@Urgau
|
What Chris said. Thanks! |

View all comments
as per the discussion, this PR applies
/Breproonly for bootstrap when buildingrustconMSVC, rather than enabling it for all Rust binaries.it also adds a
run-maketest that compiles a smallPE executable, parses itsIMAGE_DEBUG_DIRECTORYusing theobjectcrate, and verifies thatTimeDateStampvalues remain identical across repeated/Breprobuilds.r?@Urgau