extern void _libsecinit_initializer(void); // from libsecinit.dylib
extern void _libtrace_init(void); // from libsystem_trace.dylib
extern void _container_init(const char *apple[]); // from libsystem_containermanager.dylib
+extern void __libdarwin_init(void); // from libsystem_darwin.dylib
// signal malloc stack logging that initialisation has finished
// TODO: Move __malloc_init before __libc_init after breaking malloc's upward link to Libc
__malloc_init(apple);
-#if !TARGET_OS_SIMULATOR && !TARGET_OS_TV && !TARGET_OS_WATCH
+#if TARGET_OS_OSX
/* <rdar://problem/9664631> */
__keymgr_initializer();
#endif
_container_init(apple);
#endif
+ __libdarwin_init();
+
__stack_logging_early_finished();
-#if TARGET_OS_EMBEDDED && !TARGET_OS_WATCH && !__LP64__
+#if TARGET_OS_EMBEDDED && TARGET_OS_IOS && !__LP64__
_vminterpose_init();
#endif
system_c
system_configuration
system_coreservices
-system_coretls
+system_darwin
system_dnssd
system_info
-system_kernel system_sim_kernel
+system_sim_kernel system_kernel
system_m
system_malloc
system_network
system_notify
-system_platform system_sim_platform
-system_pthread system_sim_pthread
+system_sim_platform system_platform
+system_sim_pthread system_pthread
system_sandbox
system_trace
-unwind unwind_sim
+unwind
xpc
# Strip away variant information to do presence checks
# non-normal variants can always link against normal clients
- cd ${LSYS} && ls lib*.dylib | sed -E -e 's/_(debug|profile|static)\././' | while read l; do
- xcrun -sdk "${SDKROOT}" lipo "${LSYS}/${l}" -verify_arch "${arch}" 2>/dev/null
- if [ $? -eq 0 ]; then
- echo "${l}"
- fi
+ cd ${LSYS} && ls lib*.{dylib,tbd,api,spi} | sed -E -e 's/_(debug|profile|static)\././' | while read l; do
+ if [ "${l: -6}" == ".dylib" ]; then
+ xcrun -sdk "${SDKROOT}" lipo "${LSYS}/${l}" -verify_arch "${arch}" 2>/dev/null
+ else
+ xcrun -sdk "${SDKROOT}" tapi archive "${LSYS}/${l}" --verify-arch "${arch}" 2>/dev/null
+ fi
+ if [ $? -eq 0 ]; then
+ echo "${l}"
+ fi
done | sed -E -e 's/^lib//' -e 's/\..*$$//' | sort -u > ${INUSRLIBSYSTEM}
cd ${LIBSYS} && ls lib*.a | sed -E -e 's/_(debug|profile|static)\././' | while read l; do
xcrun -sdk "${SDKROOT}" lipo "${LIBSYS}/${l}" -verify_arch "${arch}" 2>/dev/null
while read line ; do
for lib in ${line} ; do
+ egrep -q "^${lib}$" ${INUSRLIBSYSTEM} && break
egrep "^${lib}$" ${INUSRLOCALLIBSYSTEM} && break
done
done < ${ALLLIBS} > ${POSSIBLEUSRLOCALLIBSYSTEM}