This reinstates the libSystem selective symbol export machinery we used
to have, but locks it to the symbols that were present in 10.11 and skips
the actual compiled code we put into that library in favor of the system
initialization code. That should make it more stable and less likely to
do weird stuff than the last time we did this.
Fixes#18840: too large closure of mesa_drivers.
Tested atop 16.09:
- clang compiles a hello-world app;
- mesa seems to link OK;
- ispc builds.
Size comparison:
- 80 MB of full llvm-3.7 on 16.03;
- 200 MB of full llvm-3.9 on 16.09 before this patch;
- 50 MB of libLLVM after this commit.
It's a long build and generally painful to split into smaller commits,
so I apologize for lumping many changes into one commit but this is far
easier.
There are still several outdated parts of the darwin stdenv but these
changes should bring us closer to the goal.
Fixes#18461
- Enable the shared library build on darwin by default to match other
platforms.
- Fix the dylib file's name in the store
- Symlink a versioned name as some tooling expects this.
Make Obj public in llvm's IntrusiveRefCntPtr
This fixesNixOs/nixpkgs#15974
It's not a nice fix, as it's really clang's problem. The proper fix
should modify clang's usage of IntrusiveRefCntPtr.
Refers to non-existent files; see e.g.,
https://hydra.nixos.org/build/36359717/nixlog/1/raw
Likely a copy-paste error that has gone unnoticed because paxmark didn't
do anything, but breaks after 6648b04381b8fefb704824f5db898813f22dafbb
The hashes for libc++ and libc++abi were wrong.
There was also an incompatibility with nixpkgs on darwin which is now
weakly worked around: the "os_trace" macro changed definition in the OS
X development SDK since version 10.9 as used by nixpkgs. LLVM 3.8 uses
the new version, which I am temporarily replacing with a printf on
darwin as it is only used in one minor location.
vcunat's review:
- let's not switch the default versions of llvm* for now
- the only changes I see is adding python to clang's buildInputs
and using the big so-file as discussed in #12759
(BUILD_SHARED_LIBS -> LLVM_LINK_LLVM_DYLIB)
- in future it will be nice to split libLLVM into a separate output