From owner-svn-src-all@freebsd.org Wed Nov 4 17:40:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BAA2A4627AF; Wed, 4 Nov 2020 17:40:39 +0000 (UTC) (envelope-from dim@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRDT34YY1z43Cc; Wed, 4 Nov 2020 17:40:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 670061E80B; Wed, 4 Nov 2020 17:40:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::a5b3:1b51:5589:5564] (unknown [IPv6:2001:470:7a58:0:a5b3:1b51:5589:5564]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7EF9F3F8AB; Wed, 4 Nov 2020 18:40:37 +0100 (CET) From: Dimitry Andric Message-Id: <9AE259A8-F497-486E-94E0-07E1CA2C2BD7@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_689C94B6-26A4-41AB-AB46-FAC9243C4C3A"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: svn commit: r367304 - in head: share/man/man5 share/mk tools/build/options usr.bin usr.bin/clang usr.bin/clang/llvm-cxxfilt Date: Wed, 4 Nov 2020 18:40:27 +0100 In-Reply-To: <20201104163811.2waowgqzarpr3asr@mutt-hbsd> Cc: Ed Maste , src-committers , svn-src-all , svn-src-head To: Shawn Webb References: <202011031957.0A3JvSJ4038311@repo.freebsd.org> <20201104163811.2waowgqzarpr3asr@mutt-hbsd> X-Mailer: Apple Mail (2.3445.104.17) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 17:40:39 -0000 --Apple-Mail=_689C94B6-26A4-41AB-AB46-FAC9243C4C3A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 4 Nov 2020, at 17:38, Shawn Webb wrote: >=20 > On Wed, Nov 04, 2020 at 11:26:51AM -0500, Ed Maste wrote: >> On Tue, 3 Nov 2020 at 14:57, Dimitry Andric wrote: >>>=20 >>> Author: dim >>> Date: Tue Nov 3 19:57:28 2020 >>> New Revision: 367304 >>> URL: https://svnweb.freebsd.org/changeset/base/367304 >>>=20 >>> Log: >>> Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt >>=20 >> A previous argument against the LLVM versions of binutils = replacements >> is that they were excessively large, but this does not look like a >> substantial problem here. LLVM's cxxfilt is indeed many times the = size >> of ELF Tool Chain's, but still small enough that for a tool chain >> component it's not a concern, in my opinion. >>=20 >> ELF Tool Chain: >> $ size obj/c++filt >> text data bss dec hex filename >> 66966 1008 8400 76374 0x12a56 obj/c++filt >>=20 >> LLVM: >> $ size obj/llvm-cxxfilt >> text data bss dec hex filename >> 378138 1756 9165 389059 0x5efc3 obj/llvm-cxxfilt >>=20 >> A remaining issue is that both nm and addr2line can also demangle C++ = symbols. >=20 > This brings a question: is there any guidance as to what FreeBSD > considers "too large of a component" for a toolchain component (or any > other various components, like src.git/stand)? I think this guidance originates from the world of embedded systems, where storage size is a more limiting factor than on recent desktop or server class machines. On my desktops I won't care too much whether an executable is 1M or 100MB, but on a small SD card things add up very quickly! That said, llvm-related tools such as llvm-ar or llvm-cxxfilt are pretty big, mainly because all of them are written in C++ with a lot of templates, and we link the llvm and clang .a files statically into them. It would save some space to stuff all those library files into a shared library, and link the tools against that, but the disadvantage is that it will take a *lot* of memory and CPU time to link that (huge) shared library. I experimented a little with that in the past, and it's very difficult to make it work on 32-bit systems. -Dimitry --Apple-Mail=_689C94B6-26A4-41AB-AB46-FAC9243C4C3A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX6LniwAKCRCwXqMKLiCW o8gKAKCxbjEuJ990AqwplrupcNnlvDdPLgCg/yq3CATtsvZ1Loi3ddH2qoOimwU= =PtyD -----END PGP SIGNATURE----- --Apple-Mail=_689C94B6-26A4-41AB-AB46-FAC9243C4C3A--