The source distribution contains binaries (probably for testing) that
make the Avira virus scanner treat it as malware on account of a “bad
ELF header”. Apart from being preferable in general, the HTTPS download
makes the file opaque to the overeager AV scanner in transparent
proxying setups.
Also adapt to the fact that the canonical downloads now point to a URL
like this:
https://releases.llvm.org/4.0.1/llvm-4.0.1.src.tar.xz
llvm-config is a tool to output compile and linker flags, when compiling against llvm.
The tool however outputs static library names despite libllvm is build
as shared library on nixos. This was fixed for llvm 3.4, 3.5 and 3.7.
For llvm 3.8 and 3.9 it printed the library extension twice (.so.so).
This was fixed in 4.0 and the patch is backported to 3.8 and 3.9 in
this pull request.
```
$ for i in 34 35 37 38 39; do echo "\nllvm-$i"; nix-shell -p llvmPackages_$i.llvm --run 'llvm-config --libnames'; done
llvm-34
libLLVMInstrumentation.so libLLVMIRReader.so libLLVMAsmParser.so
...
llvm-35
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMipo.so
...
llvm-37
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMBitWriter.so
...
llvm-38
libLLVM-3.8.1.so
llvm-39
libLLVM-3.9.so
```
fixes #26713
Needed to build an executable that uses OpenMP with clang. This
includes a header file and a library that clang will link into an
executable whose source makes use of ‘omp‘ pragmas.
This is in preparation for the LLVM 4 upgrade (which gets more strict
about e.g., return false in xcbuild itself) and also for using xcbuild
more extensively in the Darwin stdenv bootstrap process, which is why I
killed the unnecessary gcc dependency in the toolchain. llvm-cov pretends
to be gcov anyway, so we're fine.
Splits outputs in clang like we do in 3.8 and 4.0 to avoid runtime
dependency on Python in the main derivation.
I also disable TSAN on Darwin to maintain consistency with 4.0, which
disables it because it forces an unfree dependency in the stdenv.
Split outputs because there's no point in keeping a reference to Python
and it causes trouble during the Darwin stdenv bootstrap. There's also
an unnecessary dependency on LLVM in libc++ which causes us to rebuild
LLVM several more times than necessary during bootstrap, and an awkward
dependency on XPC in the TSAN that we turn off. This is in preparation
for using LLVM 4 in the Darwin stdenv and by default across nixpkgs.