Firefox and llvm

Jan Beich jbeich at FreeBSD.org
Mon Jun 17 02:25:31 UTC 2019


"Mikhail T." <mi+thun at aldan.algebra.com> writes:

> On 16.06.19 21:31, Jan Beich wrote:
>
>> "Mikhail T." <mi+thun at aldan.algebra.com> writes:
>>
>>> Gentlemen, do you realize, building Firefox on FreeBSD today one has
>>> to wait for the entire LLVM to be recompiled -- /twice/: once because
>>> gecko, inexplicably, wants LLVM itself, and also because rust builds
>>> its own bundled version...
>>>
>>> What's wrong with the binaries provided by the base OS?.. Yours,
>> See https://wiki.freebsd.org/WhyDoIHaveToBuildLLVMWhenIAlreadyHaveClangInstalled
>
> Don't know about the video-drivers, but Firefox will happily build
> with llvm60, llvm70, and llvm80 -- for all the alleged "instability",
> evidently, the version is not a problem.

clang-sys didn't support llvm80 when gecko@ switched to it. I'm not sure
myself why but maybe bindgen uses a subset of bindings that're stable.

>> Maybe add "www/firefox needs libclang.so since 56.0
> Looking at my currently running firefox with lsof, I do not see
> libclang being used. Indeed, the library is not used at all on my
> machine: "lsof | grep libclang" yields nothing...

firefox only uses bindgen (depends on clang-sys) during build.

>> and llvm-objdump since 67.0" if you have wiki account.
>
> I suspect, it is possible to remove this requirement with a small
> patch -- 

Good luck. Make sure to test in a clean environment e.g., via poudriere.

> I can't see, what good llvm-objdump could do to the vast majority of
> users.

See https://hg.mozilla.org/mozilla-central/rev/53d93ee3ad84
While the commit was backed out the configure check wasn't, so maybe
the intent is to reland in future.

> And if it does something good, llvm-objdump is already part of base
> (at least, on this 12.0-STABLE laptop I'm trying to dress up)...

llvm-objdump is only installed when src.conf(5) has WITH_CLANG_EXTRAS.
Ports have to build against default base configuration.


More information about the freebsd-gecko mailing list