darwin.libSystem: fix intermittent impurity bug

If you've seen issues with libsystem_symptoms.dylib,
this should fix that.
This commit is contained in:
Dan Peebles 2017-04-09 09:39:30 -04:00
parent f6fc8467cd
commit d93f2c3865
2 changed files with 46 additions and 1 deletions

View file

@ -76,7 +76,11 @@ appleDerivation rec {
/usr/lib/libSystem.dylib \
-reexported_symbols_list ${./system_symbols}
libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
# We used to determine these impurely based on the host system, but then when we got some 10.12 Hydra boxes,
# one of them accidentally built this derivation, referenced libsystem_symptoms.dylib, which doesn't exist on
# 10.11, and then broke all subsequent builds on 10.11. By picking a 10.11 compatible subset of the libraries,
# we avoid scary impurity issues like that.
libs=$(cat ${./reexported_libraries} | grep -v '^#')
for i in $libs; do
if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then

View file

@ -0,0 +1,41 @@
# These are generated with otool -L /usr/lib/libSystem.dylib on a 10.11 machine
/usr/lib/system/libcache.dylib
/usr/lib/system/libcommonCrypto.dylib
/usr/lib/system/libcompiler_rt.dylib
/usr/lib/system/libcopyfile.dylib
/usr/lib/system/libcorecrypto.dylib
/usr/lib/system/libdispatch.dylib
/usr/lib/system/libdyld.dylib
/usr/lib/system/libkeymgr.dylib
/usr/lib/system/liblaunch.dylib
/usr/lib/system/libmacho.dylib
/usr/lib/system/libquarantine.dylib
/usr/lib/system/libremovefile.dylib
/usr/lib/system/libsystem_asl.dylib
/usr/lib/system/libsystem_blocks.dylib
# We handle this specially in the expression
# /usr/lib/system/libsystem_c.dylib
/usr/lib/system/libsystem_configuration.dylib
/usr/lib/system/libsystem_coreservices.dylib
/usr/lib/system/libsystem_coretls.dylib
/usr/lib/system/libsystem_dnssd.dylib
/usr/lib/system/libsystem_info.dylib
# We handle this specially in the expression
# /usr/lib/system/libsystem_kernel.dylib
/usr/lib/system/libsystem_m.dylib
/usr/lib/system/libsystem_malloc.dylib
/usr/lib/system/libsystem_network.dylib
/usr/lib/system/libsystem_networkextension.dylib
/usr/lib/system/libsystem_notify.dylib
/usr/lib/system/libsystem_platform.dylib
/usr/lib/system/libsystem_pthread.dylib
/usr/lib/system/libsystem_sandbox.dylib
/usr/lib/system/libsystem_secinit.dylib
/usr/lib/system/libsystem_trace.dylib
/usr/lib/system/libunc.dylib
/usr/lib/system/libunwind.dylib
/usr/lib/system/libxpc.dylib