# What for www/firefox port pulls devel/llvm90 in?



## YuryG (Mar 26, 2020)

I am building ports from sources, and upgrading www/firefox I was discouraged to see that it pulls and installs devel/llvm90 also. May be a waste of your time, but I am wondering, what pulls devel/llvm90?


----------



## Alexander88207 (Mar 26, 2020)

devel/llvm90 is a build dependenciy


----------



## YuryG (Mar 26, 2020)

Alexander88207 said:


> devel/llvm90 is a build dependenciy


And in what files in /usr/ports/www/firefox/ it is mentioned?


----------



## Alexander88207 (Mar 26, 2020)

I dont know where its written but the switch to devel/llvm90 is mentioned here: https://svnweb.freebsd.org/ports/head/www/firefox/Makefile?annotate=512440


----------



## T-Daemon (Mar 26, 2020)

Run in the ports directory `make build-depends-list`, more lists in man ports(7) (run-depends-list, all-depends-list, pretty-print-run-depends-list, pretty-print-build-depends-list).


----------



## YuryG (Mar 27, 2020)

Alexander88207 said:


> I dont know where its written but the switch to devel/llvm90 is mentioned here: https://svnweb.freebsd.org/ports/head/www/firefox/Makefile?annotate=512440


For I was searching mentioning llvm90 (or just llvm) in ports' directory, but found nothing, so I deinstalled llvm90 and it was rebuild again.
And chromium has llvm70 in its tree (to build itself?).
And mesa requires llvm80 (although the system stable-11 has 80, and stable-12 has 90).


----------



## zirias@ (Mar 27, 2020)

YuryG said:


> For I was searching mentioning llvm90 (or just llvm) in ports' directory, but found nothing, so I deinstalled llvm90 and it was rebuild again.


For many recurring and more complex dependency scenarios, ports don't set dependencies directly but rely un the port system's `USES` framework. Without looking into this particular port, llvm90 is probably pulled in by a `USES=compiler` with according options -- see also /usr/ports/Mk/Uses/compiler.mk.


----------



## shkhln (Mar 27, 2020)

YuryG said:


> And mesa requires llvm80 (although the system stable-11 has 80, and stable-12 has 90).



Base llvm has limited selection of backends:

```
% touch test.c
% clang90 --target=amdgcn-amd-amdhsa-opencl ./test.c -o /dev/null
% clang --target=amdgcn-amd-amdhsa-opencl ./test.c -o /dev/null
error: unable to create target: 'No available targets are compatible with triple "amdgcn-amd-amdhsa-opencl"'
1 error generated.
```


----------



## sidetone (Mar 27, 2020)

It probably only needs ELF utils from llvm90, but it's one package, so it pulls it all in and compiles it. 

If there's a newer port than the package, Uses makes it build the newer port, even if there's no vulnerabilities in it.


----------



## zirias@ (Mar 27, 2020)

Zirias said:


> llvm90 is probably pulled in by a  USES=compiler with according options


After having a look, it's probably a `USE_GECKO` (see bsd.gecko.mk). `LLVM_DEFAULT` is currently set to 90 in bsd.default-versions.mk, so unless you override that in your make.conf, that's the version pulled in by gecko.


----------



## YuryG (Mar 27, 2020)

Zirias said:


> For many recurring and more complex dependency scenarios, ports don't set dependencies directly but rely un the port system's `USES` framework. Without looking into this particular port, llvm90 is probably pulled in by a `USES=compiler` with according options -- see also /usr/ports/Mk/Uses/compiler.mk.


I suppose, I found it, it is in /usr/ports/Mk/bsd.gecko.mk.


----------

