]>
git.saurik.com Git - apple/ld64.git/blob - src/create_configure
3 echo "" > ${DERIVED_FILE_DIR}/configure.h
5 if [ -n "${IPHONEOS_DEPLOYMENT_TARGET}" ]; then
6 echo "#define DEFAULT_IPHONEOS_MIN_VERSION \"${IPHONEOS_DEPLOYMENT_TARGET}\"" >> ${DERIVED_FILE_DIR}/configure.h
8 if [ -n "${MACOSX_DEPLOYMENT_TARGET}" ]; then
9 echo "#define DEFAULT_MACOSX_MIN_VERSION \"${MACOSX_DEPLOYMENT_TARGET}\"" >> ${DERIVED_FILE_DIR}/configure.h
13 if [ -z "${RC_SUPPORTED_ARCHS}" ]; then
14 RC_SUPPORTED_ARCHS
="i386 x86_64"
17 for ANARCH
in ${RC_SUPPORTED_ARCHS}
19 KNOWN_ARCHS
=",armv4t,armv5,armv6,armv7,i386,x86_64,"
20 FOUND
=`echo "$KNOWN_ARCHS" | grep ",$ANARCH,"`
22 echo "#define SUPPORT_ARCH_$ANARCH 1" >> ${DERIVED_FILE_DIR}/configure.h
24 echo "#error uknown architecture: $ANARCH" >> ${DERIVED_FILE_DIR}/configure.h
28 echo "#define ALL_SUPPORTED_ARCHS \"${RC_SUPPORTED_ARCHS}\"" >> ${DERIVED_FILE_DIR}/configure.h
31 # <rdar://problem/10897631> ld64 hardcodes a reference to /Developer/usr/lib/libLTO.dylib
32 if [ -n "${DT_TOOLCHAIN_DIR}" ]
34 echo "-Wl,-lazy_library,${DT_TOOLCHAIN_DIR}/usr/lib/libLTO.dylib" > ${DERIVED_SOURCES_DIR}/LTO_option.txt
36 if [ -e "/Developer/usr/lib/libLTO.dylib" ]
38 echo "-Wl,-lazy_library,/Developer/usr/lib/libLTO.dylib" > ${DERIVED_SOURCES_DIR}/LTO_option.txt
40 echo "-Wl,-lazy_library,${BUILT_PRODUCTS_DIR}/../lib/libLTO.dylib" > ${DERIVED_SOURCES_DIR}/LTO_option.txt