From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 68BEC158042 for ; Sat, 9 Nov 2024 16:46:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E1AF8E0858; Sat, 9 Nov 2024 16:45:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A1391E0837 for ; Sat, 9 Nov 2024 16:45:59 +0000 (UTC) Message-ID: <70781f1308cd370f762732053220083c8f734431.camel@gentoo.org> Subject: [gentoo-dev] [RFC] Dealing with default upstream Rust flags (?) From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Sat, 09 Nov 2024 17:45:54 +0100 Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ETBsPSYKO8ne282h9JtO" User-Agent: Evolution 3.52.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: a9609d04-636c-48f6-af35-411e0359fd41 X-Archives-Hash: 35d7118d9d55e63c162b9bd3ba1f3143 --=-ETBsPSYKO8ne282h9JtO Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Long story short, a lot of Rust upstreams are ricing in their Cargo.toml: enabling LTO, adjusting LTO jobs to exactly 1, and even weirder stuff. With C, we generally have clear policies to override this and respect user flags. With Rust, things aren't that clear. Say, let's look at fractal: [profile.release] debug =3D true lto =3D "thin" codegen-units =3D 1 Upstream is enabling LTO with 1 job (i.e. single threaded) to squeeze as much as they can from it. Also, they are enabling debug symbols for some reason. As a result, the build takes 45 minutes, if it doesn't OOM first. How much of that stuff should we respect? Or should we perhaps override it all? Should we do some special magic via eclass, or perhaps expect users to set specific RUSTFLAGS for that? Perhaps set default RUSTFLAGS in the profiles? --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-ETBsPSYKO8ne282h9JtO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmcvkcISHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQO2mQIALn7umbJLpRL1oGZZb5egQxY+RGylruW xkWSYv+DlVcbZYfMYGogOIG/ojA9o4MaRURkaglXLvD+d1J4mH334hFJpNEHxYlk qCUP4/0kaGDMMM8tKqdp5CfjKRqeODaGssyUMj+0Nh+H+j164/D6lrrCrAARei89 Pswv42ZvVjimNBI54puuWlkSjMxCosCpSkCngxpYd+MsOKILXd95n4wj6ib1Pqb8 8xsI/0N8Q7b+u5p4PocQ5PgmUaP2X9fX+xoL9F1ZkygezW2223vBKWLr3l26DXLE kDPeoOmw+NZTdEFECX+hfbtoh8pn3mkF97jYV+Biy+szuzUNJ7v2qjI= =LZ1G -----END PGP SIGNATURE----- --=-ETBsPSYKO8ne282h9JtO--