• [gentoo-dev] [PATCH 5/7] cargo.eclass: use custom profile for all build

    From Georgy Yakovlev@21:1/5 to All on Thu Feb 9 22:00:01 2023
    also move install path to config file, so it can be
    overriden via command line arg if required.

    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
    ---
    eclass/cargo.eclass | 33 ++++++++++++++++++++++++++-------
    1 file changed, 26 insertions(+), 7 deletions(-)

    diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
    index 0ab7ee0dc9b2..a7c7bffd3c0c 100644
    --- a/eclass/cargo.eclass
    +++ b/eclass/cargo.eclass
    @@ -266,10 +266,26 @@ cargo_gen_config() {
    [net]
    offline = true

    + [profile.gentoo]
    + # https://doc.rust-lang.org/cargo/reference/profiles.html#custom-profiles
    + inherits = "release"
    +
    + # emulate dev profile with USE=debug
    + # https://doc.rust-lang.org/cargo/reference/profiles.html#dev
    + debug = $(usex debug true false)
    + debug-assertions = $(usex debug true false)
    + overflow-checks = $(usex debug true false)
    + strip = "none"
    + $(usex debug 'opt-level = 0' '')
    + $(usex debug 'lto = false' '')
    +
    [build]
    jobs = $(makeopts_jobs)
    incremental = false

    + [install]
    + root = "${ED}/usr"
    +
    [term]
    verbose = true
    $([[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo "color = 'never'")
    @@ -506,7 +522,7 @@ car
  • From Ionen Wolkens@21:1/5 to Georgy Yakovlev on Thu Feb 9 22:40:02 2023
    On Thu, Feb 09, 2023 at 12:48:45PM -0800, Georgy Yakovlev wrote:
    + strip = "none"

    strip was stabilized in rust-1.59, this will likely fail without
    USE=nightly on older rusts and other patch is only setting >=1.57

    Haven't checked other options, I just happened to remember this one.
    --
    ionen

    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmPlZyEACgkQskQGsLCs QzRRhwf+J0qSCJytSmXkLiODTx9RUYgBvwTKiJ+KLP6+os1dus0jRqQrQH0Dw/EJ pBShPsLdl3KJ3jbs8PPHW/dWeoaYwMC6UJGcUMukzQHKFJHtnzNO/bNube5WBLrE EBkXoulKbIsFCTOm8gXfz2SLl1mGlYzXJnKNQnFmMIp2QAxoIHibyOBdvfVNRs0I mtfCPZaTcUDgxiARMMV3O4u6Tk93fmgPagbD8Y2b6TORboN76fg419TPWGYyXbDm 7DENohg5fRwwkonzr2cnKT3UtMKnIDik57EcDW2OZqIvufgmLSC3HzOMglr3Lv58 ELy1Yy+EhZ1G8v8oBucdSmcibJrzZg==
    =fHST
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Georgy Yakovlev@21:1/5 to Ionen Wolkens on Fri Feb 10 22:20:01 2023
    On Thu, 2023-02-09 at 16:35 -0500, Ionen Wolkens wrote:
    On Thu, Feb 09, 2023 at 12:48:45PM -0800, Georgy Yakovlev wrote:
    +       strip = "none"

    strip was stabilized in rust-1.59, this will likely fail without
    USE=nightly on older rusts and other patch is only setting >=1.57

    Haven't checked other options, I just happened to remember this one.
    might have missed one, thanks.
    Will re-check and if it's the case - document it above minimum req line
    and bump it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)