]> git.saurik.com Git - apple/dyld.git/blob - build-scripts/update_dyld_shared_cache-build.sh
dyld-832.7.1.tar.gz
[apple/dyld.git] / build-scripts / update_dyld_shared_cache-build.sh
1
2 if [ "${ACTION}" = "install" ]
3 then
4 OBJROOT_LOCAL="${TARGET_TEMP_DIR}/Objects_Local"
5 xcodebuild install -target dyld_shared_cache_builder SDKROOT="${SDKROOT}" MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} OBJROOT="${OBJROOT_LOCAL}" SRCROOT="${SRCROOT}" DSTROOT="${DSTROOT}" SYMROOT="${SYMROOT}" RC_ProjectSourceVersion="${RC_ProjectSourceVersion}" DISABLE_SDK_METADATA_PARSING=YES
6
7 # On macOS, also install dyld_shared_cache_builder to the platform so that root_util can find it.
8 if [ "${RC_PURPLE}" = "" ]
9 then
10 if [ "${PLATFORM_DIR}" != "" ]
11 then
12 # Note this is set to something like DEVELOPER_INSTALL_DIR=/Applications/Xcode.app/Contents/Developer
13 mkdir -p ${DSTROOT}/${DEVELOPER_INSTALL_DIR}/Platforms/MacOSX.platform/usr/local/bin/
14 cp ${DSTROOT}/usr/local/bin/dyld_shared_cache_builder ${DSTROOT}/${DEVELOPER_INSTALL_DIR}/Platforms/MacOSX.platform/usr/local/bin/dyld_shared_cache_builder
15 fi
16 fi
17
18 if [ "${RC_PURPLE}" = "YES" ]
19 then
20 OBJROOT_UTILS="${TARGET_TEMP_DIR}/Objects_Utils"
21 xcodebuild install -target dyld_closure_util -target dyld_shared_cache_util SDKROOT="${SDKROOT}" MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} OBJROOT="${OBJROOT_UTILS}" SRCROOT="${SRCROOT}" DSTROOT="${DSTROOT}" SYMROOT="${SYMROOT}" RC_ProjectSourceVersion="${RC_ProjectSourceVersion}" DISABLE_SDK_METADATA_PARSING=YES
22 if [ "${RC_BRIDGE}" != "YES" ]
23 then
24 OBJROOT_SIM="${TARGET_TEMP_DIR}/Objects_Sim"
25 xcodebuild install -target update_dyld_sim_shared_cache SDKROOT="${SDKROOT}" MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} OBJROOT="${OBJROOT_SIM}" SRCROOT="${SRCROOT}" DSTROOT="${DSTROOT}" SYMROOT="${SYMROOT}" RC_ProjectSourceVersion="${RC_ProjectSourceVersion}" DISABLE_SDK_METADATA_PARSING=YES
26 fi
27 else
28 OBJROOT_MAC="${TARGET_TEMP_DIR}/Objects_Mac"
29 xcodebuild install -target update_dyld_shared_cache_tool SDKROOT="${SDKROOT}" MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} OBJROOT="${OBJROOT_MAC}" SRCROOT="${SRCROOT}" DSTROOT="${DSTROOT}" SYMROOT="${SYMROOT}" RC_ProjectSourceVersion="${RC_ProjectSourceVersion}" DISABLE_SDK_METADATA_PARSING=YES
30 OBJROOT_MAC="${TARGET_TEMP_DIR}/Objects2_Mac"
31 xcodebuild install -target update_dyld_shared_cache_root_mode_tool SDKROOT="${SDKROOT}" MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} OBJROOT="${OBJROOT_MAC}" SRCROOT="${SRCROOT}" DSTROOT="${DSTROOT}" SYMROOT="${SYMROOT}" RC_ProjectSourceVersion="${RC_ProjectSourceVersion}" DISABLE_SDK_METADATA_PARSING=YES
32 fi
33 fi
34
35 # On macOS build the kernel linker in to /usr/lib too. It defaults to the toolchain
36 if [ "${ACTION}" != "installhdrs" ]
37 then
38 if [ "${RC_PURPLE}" = "" ]
39 then
40 OBJROOT_MAC="${TARGET_TEMP_DIR}/Objects_Linker_Mac"
41 xcodebuild ${ACTION} -target libKernelCollectionBuilder SDKROOT="${SDKROOT}" MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} OBJROOT="${OBJROOT_MAC}" SRCROOT="${SRCROOT}" DSTROOT="${DSTROOT}" SYMROOT="${SYMROOT}/usr/lib" RC_ProjectSourceVersion="${RC_ProjectSourceVersion}" LD_DYLIB_INSTALL_NAME="/usr/lib/libKernelCollectionBuilder.dylib" INSTALL_PATH="/usr/lib"
42 fi
43 fi