Quoting noisyc...@tutanota.com (2024-08-27 10:14:40)
> Yes, I think you misunderstood. Your patch, as it is, will *always*
> build code for i386 when cross compiling, because the `cfg` check in
> build.rs applies to the build machine and the empty main function (via
> #[cfg(not(target_arch = "x86"))]) will always be compiled instead of
> the top one. CI succeeding is the expected behavior because the patch
> doesn't do anything when cross compiling.
> 
> The issue is the opposite: nothing will prevent from building unsound
> code when cross compiling (the default for i386 on Debian infra)
> because the topmost main function, which in your intentions would make
> i386 optimized builds fail, is never compiled during cross builds
> (again, #[cfg(target_arch = "x86")] is checked for the build machine,
> which in Debian's case is "x86_64", and not for the target machine.

Sorry, I still don't understand: If my patch effectively does nothing,
then why do the tests now succeed when they failed without the patch
applied?

Due to accidentally using wrong environment variable, it has even been
tested that with the patch applied but without disabling optimization,
the build on i386 will fail, emitting the message from the patch.

Sorry, but it seems to me that you are making a theoretic argument that
contradicts empirical evidence from Debian CI infrastructure.  Please,
if you still think that the patch as currently applied is somehow broken
then try spell it oout to me in even finer detail.

Thanks for your patience with me,


 - 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