Quoting noisyc...@tutanota.com (2024-08-26 19:30:29)
> > Also, would be neat if the patch was improved to not fail but lower 
> > optimization level and emit a warning.
> 
> I liked the idea so I started playing around a bit. While I haven't
> found a way to achieve that yet (simply setting environment variables
> doesn't seem to work and there doesn't seem to be a facility for
> setting arbitrary rustflags from within build.rs) I found out that
> your patch will likely not work on Debian infra. Apparently, the `cfg`
> checks in build.rs (and build.rs only) apply to the build machine, not
> to the target, and on Debian's infra the i386 binaries are usually if
> not exclusively built on amd64 machines, so the empty main function
> will be built instead. I'm going to send you a MR to fix this.

Good catch!


> As for lowering the optimization level from within the build script,
> I'm not sure this is possible given what I wrote above. If I come up
> with something I'll send you a MR :-) And if you know a way to do it
> let me know!

Auto-adapting based on build-host rather that target-host is still
helpful for upstream consideration, even if it doesn't cover Debian
needs.


> > It would be helpful if you could test lower optimization levels than
> > the aggressive default might succeed.
> 
> This is zero by the way, any optimization level greater than zero
> builds unsound code and fails tests.

Thanks for checking!

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/
 * Sponsorship: https://ko-fi.com/drjones

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to