https://bugzilla.redhat.com/show_bug.cgi?id=2124697
--- Comment #69 from Fabio Valentini decathorpe@gmail.com --- It might be possible to partially work around this by writing the value of the `%build_rustflags` macro to the RUSTFLAGS environment variable, with something like:
export RUSTFLAGS="%build_rustflags"
(untested)
And looking at the difference between the values of "%cargo_build"
"/usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' /usr/bin/cargo build -j16 -Z avoid-dev-deps --release"
and "%build_rustflags"
"-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn"
that *should* be enough, since the script is already passing `--release`.
We'll still need to verify that the flags actually end up being passed through correctly cargo / rustc - especially `-Cdebuginfo=2` - otherwise builds of the package won't get valid debug information.