Re: [blfs-dev] clang as a hard dependency, was Re: firefox (and js) -> rust -> llvm dependency

2020-09-09 Thread Ken Moffat via blfs-dev
On Tue, Sep 08, 2020 at 12:50:16PM -0500, Bruce Dubbs via blfs-dev wrote:
> On 9/8/20 6:19 AM, Ken Moffat via blfs-dev wrote:
> > On Mon, Aug 17, 2020 at 07:00:08PM +0100, Ken Moffat via blfs-dev wrote:
> > > On Mon, Aug 17, 2020 at 01:33:49PM +0800, Xi Ruoyao via blfs-dev wrote:
> > > > I just drafted js78 page.  When it was built, the building system 
> > > > utilized some
> > > > LLVM tools (llvm-objdump and llvm-profdata).
> > > > 
> > > > Is a rustc built with shipped LLVM providing llvm-objdump and 
> > > > llvm-profdata,
> > > > which could be used during firefox or js build?  If not we should list 
> > > > LLVM as a
> > > > firefox/js hard dependency.
> > > 
> > > It seems to.
> > > 
> > > On my experimental build last month with llvm-11-rc I had to build
> > > rust with its shipped llvm.  Clearly I had already installed those
> > > two programs, but looking at the log I see
> > > 
> > > [1656/1728] Linking CXX executable bin/llvm-objdump
> > >   and
> > > [1620/1728] Linking CXX executable bin/llvm-profdata
> > > 
> > > In my current build with system llvm neither of those is mentioend
> > > in the log.
> > > 
> > Coming back to this, two points:
> > 
> > 1. It might be that we should anyway list clang from llvm as a hard
> > dependency.  At some point before we released 10.0 I had hidden
> > clang on this system - I guess that was while exploring thunderbird
> > builds with gcc - and forgotten to reinstate it.
> > 
> > Today I was trying to build firefox-81beta (if anyone else wants to
> > build 81, please read the wiki - creating the python virtual
> > environments has been separated out of ./mach build) and eventually
> > got it to run ./mach build, only to fail because it couldn't find
> > clang which is apparently needed for cbindgen to use.
> > 
> > I have not yet played with current firefox-esr in the absence of
> > clang, nor current js68, but I see from my firefox-78.2.0esr log:
> > 
> >   0:22.46 checking for cbindgen... /usr/bin/cbindgen
> >   0:22.46 checking for rustfmt... /opt/rustc/bin/rustfmt
> >   0:22.46 checking for clang for bindgen... /usr/bin/clang++
> >   0:22.46 checking for libclang for bindgen... /usr/lib/libclang.so
> >   0:22.46 checking that libclang is new enough... yes
> > 
> > In practice, at the moment with rust using system llvm we recommend
> > clang, but when llvm has its next release we'll probably have to
> > drop back to the shipped llvm again, so bigger and slower llvm
> > compiles.
> > 
> > 2. In llvm, should we recommend clang instead of listing it as
> > optional ?
> 
> Yes.
> 
> At the moment, both clang and compiler-rt are listed as
> > optional.  On my less-capable desktop/notebook machines I don't
> > build compiler-rt, but obviously I build clang on all of them.
> > I guess the real question is:
> > 
> > Do BLFS users build llvm without clang, and if so, what do they use
> > it for ?
> 
> I do not know.  I always build both clang and compiler-rt, but to be honest,
> I don't know what we would use compiler-rt for.
> 
>   -- Bruce

Hi Bruce,

I've now confirmed that with firefox-78.2.0esr the initial configury
fails in the same way if clang is not available.  That is, of
course, on a build using CC=gcc CXX=g++.

Looking at a log from a successful build with gcc and g++, there are
clang references in clang-sys (Rust bindings for
libclang), neqo-crypto (apparently a rust crypto library, with
verbosity turned on it produces multiple reports of clang version,
search path, and ignoring duplicate directories in that).

Mo other references, so it does seem to be (only) needed for
cbindgen - obviously if we didn't force gcc and g++ then clang would
be required.

I'll make the change.

For compiler-rt, it is claimed to provide runtime support libraries
for clang and llvm, and to be faster than gcc.  Since I have
machines where I do not build it (part of my general "Reduce what I
build to save time" approach), I doubt it is necessary for that.  It
also provides sanitizer runtimes and profiling for people who
*develop* using clang or llvm.  https://compiler-rt.llvm.org/

ĸen
-- 
I could not live without Champagne.  In victory I deserve it, in
defeat I need it.  -- Churchill
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] clang as a hard dependency, was Re: firefox (and js) -> rust -> llvm dependency

2020-09-09 Thread Ken Moffat via blfs-dev
On Tue, Sep 08, 2020 at 01:44:18PM +0200, Pierre Labastie via blfs-dev wrote:
> On Tue, 2020-09-08 at 12:19 +0100, Ken Moffat via blfs-dev wrote:
> > [... trimming to keep just the question ...]
> > I guess the real question is:
> > 
> > Do BLFS users build llvm without clang, and if so, what do they use
> > it for ?
> > 
> 
> I (or ranter jhalfs for blfs) always build llvm with clang and
> compiler-rt. For some packages, clang gets used instead of gcc. I've
> never tried to measure what is gained or lost because of that.
> 
> I think llvm standalone is mainly used by various mesa drivers
> (llvmpipe, amdgpu). Maybe also by a few audio/video codecs, but not
> sure.
> 
> Pierre
> 
Hi Pierre,

thanks for the comments.

ĸen
-- 
I could not live without Champagne.  In victory I deserve it, in
defeat I need it.  -- Churchill
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page