Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2017 17:55:19 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        Alexey Dokuchaev <danfe@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>, Johannes M Dieterich <jmd@FreeBSD.org>, Matthew Rezny <rezny@FreeBSD.org>
Subject:   Re: FYI: what it takes for RAM+swap to build devel/llvm40 with 4 processors or cores and WITH__DEBUG= (powerpc64 example)
Message-ID:  <20170330175519.GA34411@spindle.one-eyed-alien.net>
In-Reply-To: <B2BA1E9F-3B85-46AC-8FAF-32054D675102@FreeBSD.org>
References:  <3EDEF0B7-59C5-4648-9737-6682E18645BC@dsl-only.net> <39C60316-F905-490D-B0AB-BC24D7F351A2@dsl-only.net> <7F94CE59-D2CC-4D6F-B1CD-FF3D1F8EDCE7@FreeBSD.org> <20170330170648.GA38004@FreeBSD.org> <B2BA1E9F-3B85-46AC-8FAF-32054D675102@FreeBSD.org>

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

--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Mar 30, 2017 at 07:26:19PM +0200, Dimitry Andric wrote:
> On 30 Mar 2017, at 19:06, Alexey Dokuchaev <danfe@FreeBSD.org> wrote:
> >=20
> > On Mon, Mar 27, 2017 at 11:41:40AM +0200, Dimitry Andric wrote:
> >> On 26 Mar 2017, at 23:36, Mark Millard <markmi@dsl-only.net> wrote:
> >>> ...
> >>> Also interesting was:
> >>>=20
> >>> Installed packages to be REMOVED:
> >>> 	llvm40-4.0.0.r4
> >>>=20
> >>> Number of packages to be removed: 1
> >>>=20
> >>> The operation will free 49 GiB.
> >>=20
> >> Yes, this is big.  But there is no real need to build the llvm ports
> >> with debug information, unless you want to hack on llvm itself.
> >=20
> > Cc'ing jmd@ and rezny@.
> >=20
> > I've been watching increasing size of our LLVM packages with increasing
> > worry.  This is from my tinderbox cache:
> >=20
> >  $ % env LANG=3DC ls -lh llvm3*
> >  -rw-r--r--  1 root  wheel    17M Jan 29  2016 llvm35-3.5.2_1.txz
> >  -rw-r--r--  1 root  wheel    18M Mar  7  2016 llvm36-3.6.2_2.txz
> >  -rw-r--r--  1 root  wheel    27M Feb 28 01:05 llvm37-3.7.1_4.txz
> >  -rw-r--r--  1 root  wheel   207M Jan 19 18:20 llvm38-3.8.1_5.txz
> >  -rw-r--r--  1 root  wheel   244M Mar 23 16:42 llvm39-3.9.1_2.txz
> >=20
> > Dimitry, do you know what had causes such a huge bump in 37 -> 38?
>=20
> Yes, up to llvm37, the ports were split in devel/llvmXY and lang/clangXY
> parts, with separate ports for e.g. compiler-rt and other LLVM projects.

It's mostly that we build both shared and static libraries.  llvm37
merged clang and llvm (with a clang37 metaport).  Dynamic builds were
broken for a while too which blew up program size.

> > They take lots of time to build and package.  And given that llvm
> > is indirect dependency of any X11-related port, it pessimises their
> > build times as well (devel/libclc now requires devel/llvm40 after
> > r437268).
>=20
> The previous split looks pretty hard to maintain, so that is most likely
> the reason for combining all components in one port after 3.8.
> Unfortunately the side effect is that it is way less granular.

I kept it up for several revisions past when it was desupported, but
it's absolutly impossible with the cmake infrastructure unless we want
want to build all of LLVM four times to get clang, llvm, lldb, and lld.
I'm pretty sure that would case more complaints. :)

> If we ever get infrastructure for generating multiple packages out of
> one port, the devel/llvm* ports are very good candidates. :)

Very much so.

> > With 49 GiB llvm40, I guess I won't be able to build-test post as my
> > hardware would just not be capable enough.
>=20
> As said, this is because of WITH_DEBUG.  Don't use that for the llvm
> ports, for now.  It will also allow you to build them with much less RAM
> in the machine: especially linking can take multiple GB when debuginfo
> is enabled, and optimization is off.

I'm looking into improving WITH_DEBUG.

-- Brooks

P.S. Somewhat off topice, but related.  FAIR WARNING: the days of
self-hosted 32-bit systems are numbered.  Switching to lld from our
ancient BFD linker will probably buy us some time, but I'd be surprised
if you will be able to build LLVM+CLANG with a 2GB address space in 5
years.  The sooner people make their peace with this, the better.

--nFreZHaLTZJo0R7j
Content-Type: application/pgp-signature; name="signature.asc"

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

iQEcBAEBAgAGBQJY3UaGAAoJEKzQXbSebgfAkBMIAIN/F/30yZoenplFbYojBOM2
J7c3G/3Gey/MbnSPpZtiXBUnmZ110yBviXv570T1+CXR1g0DNXUTsdfV4S1aw7Pm
2EfGY53bfTphWkckadGRyYSeH9lNAP4POj0UXCs28gS+7LB9HkJ+U0Gt7VfFNQhu
xxHuTFbGUBso6Cgu7gDAsYaboNxoWqO6l3oTzCOoM38xgHkTQAYfhZs8fbZdaGK7
QT81QTQBvE9k/p+6j4jE+KWfFG4L7PZzZuM+hAGv7Mu5PmYfXcx0BzAmNtPyCRpc
i9/uSjLFbP7bdn2Y48+6I2lLNUcGudouFJW1tQBhvd3yjkEYhkRux5hCRsiG7vo=
=vLBg
-----END PGP SIGNATURE-----

--nFreZHaLTZJo0R7j--



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