Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jul 2023 17:19:40 +0200
From:      Piotr Kubaj <pkubaj@anongoth.pl>
To:        Nuno Teixeira <eduardo@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: bf0af791ab80 - main - lang/rust: add LTO option
Message-ID:  <ZLQKjLxYHRv1aGZQ@talos>
In-Reply-To: <CAFDf7UKNikFy8Qv-c3FZ08gXM0iaESfRVMU5oHrywcDUAhGiyA@mail.gmail.com>
References:  <202307161059.36GAx0v1016085@gitrepo.freebsd.org> <CAFDf7UKNikFy8Qv-c3FZ08gXM0iaESfRVMU5oHrywcDUAhGiyA@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
I don't have any numbers, just tried to build rust and saw it seems to
work fine.

As for plans to switch it by default, I think it should be talked first
with other rust@ committers.

On 23-07-16 14:29:00, Nuno Teixeira wrote:
> 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 <pkubaj@freebsd.org> escreveu no dia domingo, 16/07/2023 à(s)
> 11:59:
> 
> > The branch main has been updated by pkubaj:
> >
> > URL:
> > https://cgit.FreeBSD.org/ports/commit/?id=bf0af791ab80f4f109bfecf4a954bcf94f00947d
> >
> > commit bf0af791ab80f4f109bfecf4a954bcf94f00947d
> > Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
> > AuthorDate: 2023-07-16 10:57:56 +0000
> > Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
> > 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?=   rust-nightly
> >  # ?= to allow users to still overwrite it in make.conf.
> >  TMPDIR?=       ${WRKDIR}
> >
> > -OPTIONS_DEFINE=                DOCS GDB SOURCES WASM
> > +OPTIONS_DEFINE=                DOCS GDB LTO SOURCES WASM
> >  OPTIONS_DEFAULT=       SOURCES WASM
> >
> >  GDB_DESC=      Install ports gdb (necessary for debugging rust programs)
> > @@ -191,7 +191,13 @@ do-configure:
> >         @${ECHO_CMD} 'deny-warnings=false' >> ${WRKSRC}/config.toml
> >         @${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml
> >         @${ECHO_CMD} 'lld=${_RUST_BUILD_WASM}' >> ${WRKSRC}/config.toml
> > +.if ${PORT_OPTIONS:MLTO}
> > +       @${ECHO_CMD} 'lto="thin"' >> ${WRKSRC}/config.toml
> > +.endif
> >         @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml
> > +.if ${PORT_OPTIONS:MLTO}
> > +       @${ECHO_CMD} 'thin-lto=true' >> ${WRKSRC}/config.toml
> > +.endif
> >  .if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE)
> >         @${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml
> >  .else
> >
> 
> 
> -- 
> Nuno Teixeira
> FreeBSD Committer (ports)

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQIyBAABCAAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmS0CowACgkQelmbhSCD
nJ3zAQ/0DH2yCL0fuvQIDbd2nGdRcRIKA6HHy+dJV2oU8xFo+6crg1E0v4uZxdx0
QD7IFkcscKNeFmMVGi9Ejg2jeCDlYWigp4oI8nF10yJjHn2HWfnCfZbVvw73Lx+d
q5MLZhgLAlgHLfardEm/dkVCZEiqBxGPytFAq2wzX45cUSKIkX6MocBRM/K4jZO2
4lV77vgBVazi5JDZBkihYc200GhjpI/2xKRbQq3QeAKPqRemFCu6mmBqdk59CCDS
mEJFSe9bZoFR6Dm8ELJ4qww/Gf8mRAXi3t3AK8XVIARg4GWY+z5WrQtRuvXXRRT4
qT3diJu6sBzLHqZ1uMDxEstLr+N2anKYL1vTHOEdsFR8jNUr7zzbSu2aqyVn5HCD
m4Vwj5ReBeyWEqWj9jy0MlLFNABlt8Ee+Fxn1U6EuUmlWlyPTFPuEl4WSLiKxiH/
ayu7J9+eTzp+G1Z6tW4cvWhKxLrNK/z6R7IO1cUWcCTBgdV5tUKnyTlqtcm9aJgW
ZgGbfWJkZninqgI057WmD4xI7ujOFLog4HBTxmFJ1/akuu/LrgvcUS4HH2U7tRsb
2ZeDCXq0JLPdVhC5U5bOMwl4Qn59UbACNxCcsz3JD3zfdqcHy7jBiifMPVqiAd3h
3XR6n8+pRBzKU5p0jL2CUbZKMydVDV+rWHbKelT1ej+L8Lk2Tg==
=SkVO
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZLQKjLxYHRv1aGZQ>