Use CARGO_PROFILE_RELEASE_LTO to fix bindings build on new cargo 2020-11-bindings-clones
authorMatt Corallo <git@bluematt.me>
Mon, 23 Nov 2020 15:20:10 +0000 (10:20 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 23 Nov 2020 16:12:49 +0000 (11:12 -0500)
commit9fe3124eb701de6e7c371aff50e211864b78ccdd
tree45552f8e197811c38a45cc966d39cbc622640c91
parent722a366fe2d864274537405fd739510b612fcc8e
Use CARGO_PROFILE_RELEASE_LTO to fix bindings build on new cargo

Newer versions of cargo broke `cargo rustc -- -Clto` by passing
`-Cembed-bitcode=no` even in `--release`. Its somewhat unclear why
this is still the case on latest cargo given it broke, at least,
compilation of Firefox, as discovered by Val at [1]. We take the
approach they used there, even though they later walked it back [2]
but the issues noted there, especially in [3] don't seem
particularly concerning in our case.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1640982
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1654465
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1654465#c5
genbindings.sh