We have bindeps at home#2537
Conversation
0ca0afb to
210408f
Compare
|
After doing some testing, this PR does not produce a binary-identical build. The I tested to confirm that the measurements upon SP reset are identical by flashing different
This branch: |
210408f to
5e91466
Compare
I trust that it's doing the correct thing, do you have a sense of what the actual differences between the binaries are? |
9b8fe84 to
3fdafe9
Compare
Found it: the Running a build with stock @lzrd @labbott Do either of you have strong opinions on whether I should make sure these flags are propagated? |
3fdafe9 to
7395954
Compare
Okay so some context for the page-size and on I have mixed feelings here. We aren't using the MPU on with endoscope so the page sizes don't really matter. Not having overflows checks makes me nervous but we might be able to specify that in the target |
7395954 to
31654a0
Compare
c3ab604 to
0b5d584
Compare
|
I've deployed the standard set of RUSTFLAGS to the custom build, because I think that overflow checks are valuable, but it's still not exactly reproducible. After fighting with it for a day, I've tracked it down to flags being set slightly differently. Here's the actual Old (using an artifact dependency): New (this PR, calling Cargo manually): I don't expect you to read all of this, but here's the important part: the new build gets I believe these arguments are inherited from the crate-level |
| out | ||
| } | ||
|
|
||
| fn common_build_config<'a>( |
There was a problem hiding this comment.
These moved to being functions on PackageConfig, because we needed many of its member variables.
endoscopeis specified as an artifact dependency ofdrv-lpc55-swd. This is a nightly-only feature, and is checked at (workspace) parse time. As we consider switching to a stable compiler, these two properties make it particularly annoying, becausecargo xtaskwill fail due to its presence before we have a chance to inject any flags.This PR implements minimal
bindepssupport in the Hubris build system. A task can declare abindepssection; those dependencies are then build and specified as environment variables.There's a little bit of plumbing required: we need a
cargo_metadata::Metadataobject to resolve manifest file from package name, so we build one and cache it in thePackageConfig. Workflows which do not construct a fullPackageConfigneed to build theMetadataobject manually; this is a little annoying but not hard (and we are guided by the function's type signature).