3 /bin
/echo "" > ${DERIVED_FILE_DIR}/dyld_cache_config.h
5 if [ -z "${ARM_SDK}" ]; then
6 # if iOS SDK not available, use MacOSX SDK
7 ARM_SDK
=`xcrun -sdk macosx.internal --show-sdk-path`
10 SHARED_REGION_FILE
="${ARM_SDK}/usr/include/mach/shared_region.h"
13 if [ -r "${SHARED_REGION_FILE}" ]; then
14 /bin
/echo -n "#define ARM_SHARED_REGION_START " >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
15 awk '/define SHARED_REGION_BASE_ARM[ \t]/ { print $3;}' "${SHARED_REGION_FILE}" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
16 /bin
/echo "" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
18 /bin
/echo -n "#define ARM_SHARED_REGION_SIZE " >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
19 awk '/define SHARED_REGION_SIZE_ARM[ \t]/ { print $3;}' "${SHARED_REGION_FILE}" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
20 /bin
/echo "" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
22 /bin
/echo -n "#define ARM64_SHARED_REGION_START " >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
23 awk '/define SHARED_REGION_BASE_ARM64[ \t]/ { print $3;}' "${SHARED_REGION_FILE}" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
24 /bin
/echo "" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
26 /bin
/echo -n "#define ARM64_SHARED_REGION_SIZE " >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
27 awk '/define SHARED_REGION_SIZE_ARM64[ \t]/ { print $3;}' "${SHARED_REGION_FILE}" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
28 /bin
/echo "" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
30 grep SHARED_REGION_BASE_ARM64_32
"${SHARED_REGION_FILE}" > /dev
/null
2>&1
31 if [ "$?" -eq "0" ]; then
32 /bin
/echo -n "#define ARM64_32_SHARED_REGION_START " >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
33 awk '/define SHARED_REGION_BASE_ARM64_32/ { print $3;}' "${SHARED_REGION_FILE}" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
34 /bin
/echo "" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
36 /bin
/echo -n "#define ARM64_32_SHARED_REGION_SIZE " >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
37 awk '/define SHARED_REGION_SIZE_ARM64_32/ { print $3;}' "${SHARED_REGION_FILE}" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
38 /bin
/echo "" >> ${DERIVED_FILE_DIR}/dyld_cache_config.h
41 /bin
/echo "ERROR: File needed to configure update_dyld_shared_cache does not exist '${SHARED_REGION_FILE}'"
45 if [ -r "${ARM_SDK}/AppleInternal/DirtyDataFiles/dirty-data-segments-order.txt" ]; then
46 mkdir -p "${DSTROOT}/${INSTALL_LOCATION}/usr/local/bin"
47 cp "${ARM_SDK}/AppleInternal/DirtyDataFiles/dirty-data-segments-order.txt" "${DSTROOT}/${INSTALL_LOCATION}/usr/local/bin"
49 if [ -r "${ARM_SDK}/AppleInternal/OrderFiles/dylib-order.txt" ]; then
50 mkdir -p "${DSTROOT}/${INSTALL_LOCATION}/usr/local/bin"
51 cp "${ARM_SDK}/AppleInternal/OrderFiles/dylib-order.txt" "${DSTROOT}/${INSTALL_LOCATION}/usr/local/bin"