]> git.saurik.com Git - apple/ld64.git/blobdiff - src/create_configure
ld64-351.8.tar.gz
[apple/ld64.git] / src / create_configure
index 8ca92bee0f6335ff5f5b5a87e1db0660a01943e1..7ba470b339b833cf37fcebd4ca838a1445b51279 100755 (executable)
@@ -11,13 +11,13 @@ else
 fi
 
 if [ -z "${RC_SUPPORTED_ARCHS}" ]; then
-       RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 armv7 armv7s armv7m arm64"
+       RC_SUPPORTED_ARCHS="i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64"
 fi
 
 for ANARCH in ${RC_SUPPORTED_ARCHS}
 do
-       KNOWN_ARCHS=",armv4t,armv5,armv6,armv7,armv7f,armv7k,armv7s,armv6m,armv7m,armv7em,armv8,arm64,arm64v8,i386,x86_64,x86_64h,"
-       FOUND=`echo "$KNOWN_ARCHS" | grep ",$ANARCH,"`
+    KNOWN_ARCHS=",armv4t,armv5,armv6,armv7,armv7f,armv7k,armv7s,armv6m,armv7m,armv7em,armv8,arm64,arm64v8,i386,x86_64,x86_64h,"
+    FOUND=`echo "$KNOWN_ARCHS" | grep ",$ANARCH,"`
        if [ $FOUND ]; then
                echo "#define SUPPORT_ARCH_$ANARCH  1" >> ${DERIVED_FILE_DIR}/configure.h
        else
@@ -25,8 +25,30 @@ do
        fi
 done
 
-echo "#define ALL_SUPPORTED_ARCHS  \"${RC_SUPPORTED_ARCHS}\"" >> ${DERIVED_FILE_DIR}/configure.h
+if [ -n "${RC_HIDE_TIDE}" ]; then
+       echo "#define ALL_SUPPORTED_ARCHS  \"${RC_SUPPORTED_ARCHS}\"" >> ${DERIVED_FILE_DIR}/configure.h
+       echo "#define SUPPORT_APPLE_TV 0" >> ${DERIVED_FILE_DIR}/configure.h
+else
+       if [ -n "${DT_VARIANT}" -a "${DT_VARIANT}" != "PONDEROSA" ]; then
+               echo "#define ALL_SUPPORTED_ARCHS  \"${RC_SUPPORTED_ARCHS}\"" >> ${DERIVED_FILE_DIR}/configure.h
+               echo "#define SUPPORT_APPLE_TV 0" >> ${DERIVED_FILE_DIR}/configure.h
+       else
+               echo "#define ALL_SUPPORTED_ARCHS  \"${RC_SUPPORTED_ARCHS} (tvOS)\"" >> ${DERIVED_FILE_DIR}/configure.h
+               echo "#define SUPPORT_APPLE_TV 1" >> ${DERIVED_FILE_DIR}/configure.h
+       fi
+fi
 
+if [ -f "${DT_TOOLCHAIN_DIR}/usr/lib/libswiftDemangle.dylib" ]; then
+       echo "${DT_TOOLCHAIN_DIR}/usr/lib/libswiftDemangle.dylib" >  ${DERIVED_FILE_DIR}/linkExtras
+       echo "#define DEMANGLE_SWIFT 1" >> ${DERIVED_FILE_DIR}/configure.h
+else
+       echo "" > ${DERIVED_FILE_DIR}/linkExtras
+fi
 
+echo "#define BITCODE_XAR_VERSION \"1.0\"" >> ${DERIVED_FILE_DIR}/configure.h
 
+if [ -n "${RC_ProjectSourceVersion}" ]; then
+       echo "#define LD64_VERSION_NUM ${RC_ProjectSourceVersion}" >> ${DERIVED_FILE_DIR}/configure.h
+else
+       echo "#define LD64_VERSION_NUM 0" >> ${DERIVED_FILE_DIR}/configure.h
+fi