From nobody Sun Jul 16 13:29:00 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R3mJm71zWz4n6GT; Sun, 16 Jul 2023 13:29:12 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R3mJm6bLCz3sf0; Sun, 16 Jul 2023 13:29:12 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689514152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hSfiigMumuyaHzEmngyquuhVM7McNjAJUoU0hWA2XGw=; b=Hm3TJr/pfRXZGrZaAlTl47ksF8Sn97ToPByI2vnj5cvexefNNDIS3n2qUaA+GwtoSKQIfh 6bbyfL1vQqWeOgRLZIVu+xB0GdENwGQ554xWflP+NvF1sjXq1ivpuH9Svyq2t8GGZUrrEM o8Hk1e+xzV3CoPNTGUjv95TqCOzl2NXZYp3Y8xDkd+P42z907Z2z0Fk1fCNJFpJlP7btzI rbSYJ9BccFwLUDWBWtq+CPObs+drEbDqiRAiXXCSzpjwvFYrnxY30VsMxHWj8LFhv46eNh pXI0+7BMjzLECKeqRLvkuOZvagwUnEiz3mJ1ZaMkaPpol2K2tJcXXXx9fWY/SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689514152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hSfiigMumuyaHzEmngyquuhVM7McNjAJUoU0hWA2XGw=; b=E1meRhXnPeklYSFn3nkqbI7p5aQocRQeb2vzvxOnyql0SMWbFG7x+SQ4jU3FPhwbxx2ax+ xv53A34PBlMhjRIMUdPY2GAhpuu4J/Sg78z68S4yxdIpygervafdYXQOYEPcJRWlaEBORW PT0HcmGdGEMTEz/xUFXDNZXsMwCcemxPqiRbLdsv4bTgNeKFHyhzPVFjOTqhzAUHx4c1Tq IY/2frDu1gglYhfBxGoTr7oO7xoGS82VIB2UTGnoM0yq1/GxLjTos5wz1e3dy3xBg6o+QQ KKPaZ5ZKpjBRpNkCK5KagRwVGhpVD87eCwSLIoCOpcHyWOHTRt7AwPrGn4Pq3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689514152; a=rsa-sha256; cv=none; b=jksXbl3VK548K36FzRiPBKnThcZbK3L+/2ydJEdxrBF77+FBPJbaXdw2krS2MVt8j4MdQY /lYHwiAc/oh0uatS/a3NhE/fVkl/h2KcRmN6KSPeqhoihfqIt7KSMuz2JjCUTpVGVEGW3c 7TL9cuQdFn7EIcaOgHX0WtqoigrnQzE3Yc6mfKpxefY8JbQ6N6gGjpdUPzcic6BAzgiHEK g4lJhRcuZmlwsnbrlx56qQEXXUFxyN/defT0a8THqtWT2s8zSnucGxQbD8v2MuxBH7H93h n6fH9/e4ccVvLAEM0hFN6VUOEcNstl9L98o9KDWgtjspwi86ncwA8V/Tz5mx0g== Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4R3mJm5X9RzmsK; Sun, 16 Jul 2023 13:29:12 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-635e6f8bf77so21787336d6.0; Sun, 16 Jul 2023 06:29:12 -0700 (PDT) X-Gm-Message-State: ABy/qLYxpbfeY6m8YzSbEJ3nTApdDtLXjWO8rRfInyN+F3++mx3v4EOU w5SVHnuv772ucmDF+20dDipArfeSxesSQPPn2Cg= X-Google-Smtp-Source: APBJJlF/eBne31sglDAoSRIvmkqo6NwlcfXch/kKtsRLQxZ8k9UDmmCDmrgFPK00B1B1lZN/efzvsLYaONQkza9ZCKI= X-Received: by 2002:a0c:9c8c:0:b0:626:3a5a:f8f8 with SMTP id i12-20020a0c9c8c000000b006263a5af8f8mr8088801qvf.58.1689514152174; Sun, 16 Jul 2023 06:29:12 -0700 (PDT) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 References: <202307161059.36GAx0v1016085@gitrepo.freebsd.org> In-Reply-To: <202307161059.36GAx0v1016085@gitrepo.freebsd.org> From: Nuno Teixeira Date: Sun, 16 Jul 2023 14:29:00 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: bf0af791ab80 - main - lang/rust: add LTO option To: Piotr Kubaj Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e22a9c06009aaada" X-ThisMailContainsUnwantedMimeParts: N --000000000000e22a9c06009aaada Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Piotr, Very curious to see the effect of rust with lto compiling ports need it, memory, cpu speed, etc. Since LTO is on by default on ports using cargo, is there any plans to turn LTO on on rust himself? Cheers, Piotr Kubaj escreveu no dia domingo, 16/07/2023 =C3=A0= (s) 11:59: > The branch main has been updated by pkubaj: > > URL: > https://cgit.FreeBSD.org/ports/commit/?id=3Dbf0af791ab80f4f109bfecf4a954b= cf94f00947d > > commit bf0af791ab80f4f109bfecf4a954bcf94f00947d > Author: Piotr Kubaj > AuthorDate: 2023-07-16 10:57:56 +0000 > Commit: Piotr Kubaj > CommitDate: 2023-07-16 10:58:20 +0000 > > lang/rust: add LTO option > --- > lang/rust/Makefile | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/lang/rust/Makefile b/lang/rust/Makefile > index 184c0768b95f..71d8416d34b8 100644 > --- a/lang/rust/Makefile > +++ b/lang/rust/Makefile > @@ -48,7 +48,7 @@ CONFLICTS_INSTALL?=3D rust-nightly > # ?=3D to allow users to still overwrite it in make.conf. > TMPDIR?=3D ${WRKDIR} > > -OPTIONS_DEFINE=3D DOCS GDB SOURCES WASM > +OPTIONS_DEFINE=3D DOCS GDB LTO SOURCES WASM > OPTIONS_DEFAULT=3D SOURCES WASM > > GDB_DESC=3D Install ports gdb (necessary for debugging rust program= s) > @@ -191,7 +191,13 @@ do-configure: > @${ECHO_CMD} 'deny-warnings=3Dfalse' >> ${WRKSRC}/config.toml > @${ECHO_CMD} 'verbose-tests=3Dtrue' >> ${WRKSRC}/config.toml > @${ECHO_CMD} 'lld=3D${_RUST_BUILD_WASM}' >> ${WRKSRC}/config.toml > +.if ${PORT_OPTIONS:MLTO} > + @${ECHO_CMD} 'lto=3D"thin"' >> ${WRKSRC}/config.toml > +.endif > @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml > +.if ${PORT_OPTIONS:MLTO} > + @${ECHO_CMD} 'thin-lto=3Dtrue' >> ${WRKSRC}/config.toml > +.endif > .if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE) > @${ECHO_CMD} 'ccache=3D"${CCACHE_BIN}"' >> ${WRKSRC}/config.toml > .else > --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000e22a9c06009aaada Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Piotr,

Very curious to= see the effect of rust with lto compiling ports need it, memory, cpu speed= , etc.

Since LTO is on by default on ports usi= ng cargo, is there any plans to turn LTO on on rust himself?

=
Cheers,

Piotr Kubaj <pkubaj@freebsd.org> escreveu no dia domingo, 16/07/2023 =C3= =A0(s) 11:59:
Th= e branch main has been updated by pkubaj:

URL: https://cgi= t.FreeBSD.org/ports/commit/?id=3Dbf0af791ab80f4f109bfecf4a954bcf94f00947d

commit bf0af791ab80f4f109bfecf4a954bcf94f00947d
Author:=C2=A0 =C2=A0 =C2=A0Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-07-16 10:57:56 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-07-16 10:58:20 +0000

=C2=A0 =C2=A0 lang/rust: add LTO option
---
=C2=A0lang/rust/Makefile | 8 +++++++-
=C2=A01 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 184c0768b95f..71d8416d34b8 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -48,7 +48,7 @@ CONFLICTS_INSTALL?=3D=C2=A0 =C2=A0rust-nightly
=C2=A0# ?=3D to allow users to still overwrite it in make.conf.
=C2=A0TMPDIR?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0${WRKDIR}

-OPTIONS_DEFINE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 D= OCS GDB SOURCES WASM
+OPTIONS_DEFINE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 D= OCS GDB LTO SOURCES WASM
=C2=A0OPTIONS_DEFAULT=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0SOURCES WASM

=C2=A0GDB_DESC=3D=C2=A0 =C2=A0 =C2=A0 Install ports gdb (necessary for debu= gging rust programs)
@@ -191,7 +191,13 @@ do-configure:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @${ECHO_CMD} 'deny-warnings=3Dfalse' &g= t;> ${WRKSRC}/config.toml
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @${ECHO_CMD} 'verbose-tests=3Dtrue' >= ;> ${WRKSRC}/config.toml
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @${ECHO_CMD} 'lld=3D${_RUST_BUILD_WASM}'= ; >> ${WRKSRC}/config.toml
+.if ${PORT_OPTIONS:MLTO}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0@${ECHO_CMD} 'lto=3D"thin"' &= gt;> ${WRKSRC}/config.toml
+.endif
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @${ECHO_CMD} '[llvm]' >> ${WRKSRC= }/config.toml
+.if ${PORT_OPTIONS:MLTO}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0@${ECHO_CMD} 'thin-lto=3Dtrue' >>= ${WRKSRC}/config.toml
+.endif
=C2=A0.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @${ECHO_CMD} 'ccache=3D"${CCACHE_BIN}&= quot;' >> ${WRKSRC}/config.toml
=C2=A0.else


--
Nuno Teixeira
FreeBSD Committ= er (ports)
--000000000000e22a9c06009aaada--