From owner-freebsd-current@freebsd.org Thu Mar 30 17:55:28 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13501D26412; Thu, 30 Mar 2017 17:55:28 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C449D1B5; Thu, 30 Mar 2017 17:55:27 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id B6AA45A9F15; Thu, 30 Mar 2017 17:55:19 +0000 (UTC) Date: Thu, 30 Mar 2017 17:55:19 +0000 From: Brooks Davis To: Dimitry Andric Cc: Alexey Dokuchaev , FreeBSD Current , FreeBSD PowerPC ML , FreeBSD Toolchain , FreeBSD Ports , Johannes M Dieterich , Matthew Rezny 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> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 17:55:28 -0000 --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 wrote: > >=20 > > On Mon, Mar 27, 2017 at 11:41:40AM +0200, Dimitry Andric wrote: > >> On 26 Mar 2017, at 23:36, Mark Millard 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--