LNXSDK/Kha/Backends/Kinc-hxcpp/khacpp/toolchain/iphoneos-toolchain.xml
2025-01-22 16:18:30 +01:00

115 lines
4.6 KiB
XML

<xml>
<echo value="Using iOS SDK ${IPHONE_VER}" if="VERBOSE"/>
<set name="HXCPP_CPP11" value="1" unless="HXCPP_NO_CPP11" />
<set name="ARCH" value ="-v7" if="HXCPP_ARMV7" />
<set name="ARCH" value ="-v7s" if="HXCPP_ARMV7S" />
<set name="ARCH" value ="-64" if="HXCPP_ARM64" />
<set name="HXCPP_USE_LIBTOOL" value="1" />
<set name="HXCPP_LIBTOOL" value="xcrun --sdk iphoneos${IPHONE_VER} libtool" />
<include name="toolchain/gcc-toolchain.xml"/>
<!--<path name="${DEVELOPER_DIR}/Platforms/iPhoneOS.platform/Developer/usr/bin" />-->
<set name="FORCE_LIBGCC" value="1" if="HXCPP_IOS_STDCPP" unless="HXCPP_GCC" />
<set name="OBJGCC" value="-c11" if="HXCPP_CPP11" />
<set name="OBJGCC" value="-gcc" if="HXCPP_GCC" />
<set name="OBJDBG" value="-dbg" if="debug" />
<set name="HXCPP_LTO_THIN" value="1" if="HXCPP_OPTIMIZE_LINK_INCREMENTAL"/>
<compiler id="iPhoneOS" exe="g++" if="iphoneos">
<exe name="xcrun --sdk iphoneos${IPHONE_VER} g++" if="HXCPP_GCC" />
<exe name="xcrun --sdk iphoneos${IPHONE_VER} clang++" />
<flag value="-c"/>
<!-- Removed for iOS 8 -->
<!-- <cppflag value="-fvisibility-inlines-hidden"/> -->
<pchflag value="-x" />
<pchflag value="c++-header" />
<cppflag value="-stdlib=libstdc++" if="FORCE_LIBGCC" />
<cppflag value="-stdlib=libc++" if="HXCPP_CPP11" />
<cppflag value="-std=c++11" if="HXCPP_CPP11" />
<mmflag value="-stdlib=libstdc++" if="FORCE_LIBGCC" />
<mmflag value="-stdlib=libc++" if="HXCPP_CPP11" />
<mmflag value="-std=c++11" if="HXCPP_CPP11" />
<flag value="-g" if="HXCPP_DEBUG_LINK"/>
<flag value="-O2" unless="debug"/>
<flag value="-arch"/>
<flag value="armv6" if="HXCPP_ARMV6" />
<flag value="armv7" if="HXCPP_ARMV7" />
<flag value="armv7s" if="HXCPP_ARMV7S" />
<flag value="arm64" if="HXCPP_ARM64" />
<flag value="-isysroot"/>
<flag value="${DEVELOPER_DIR}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${IPHONE_VER}.sdk"/>
<!-- <flag value="-miphoneos-version-min=3.0" if="HXCPP_GCC" unless="HXCPP_ARMV7" />
<flag value="-miphoneos-version-min=5.0" if="HXCPP_ARMV7" /> -->
<flag value="-miphoneos-version-min=9.0" unless="HXCPP_IOS_MIN_VERSION" />
<flag value="-miphoneos-version-min=${HXCPP_IOS_MIN_VERSION}" if="HXCPP_IOS_MIN_VERSION" />
<flag value="-fobjc-arc" if="OBJC_ARC" />
<flag value="-DOBJC_ARC" if="OBJC_ARC" />
<flag value="-DENABLE_BITCODE=YES"/>
<flag value="-fembed-bitcode" unless="debug" />
<flag value="-fembed-bitcode-marker" if="debug" />
<flag value="-Wno-parentheses" />
<flag value="-Wno-null-dereference" unless="HXCPP_GCC"/>
<flag value="-Wno-unused-value" />
<flag value="-Wno-overflow" />
<flag value="-Wno-trigraphs"/>
<cppflag value="-Wno-invalid-offsetof" />
<cppflag value="-Wno-return-type-c-linkage" />
<mmflag value="-Wno-return-type-c-linkage" />
<flag value="-Wno-bool-conversion" unless="HXCPP_GCC"/>
<!-- Removed for iOS 8 -->
<!-- <flag value="-fvisibility=hidden"/> -->
<flag value="-fno-stack-protector"/>
<flag value="-DIPHONE=IPHONE"/>
<flag value="-DIPHONEOS=IPHONEOS"/>
<include name="toolchain/common-defines.xml" />
<flag value="-flto" if="HXCPP_OPTIMIZE_LINK" unless="debug || HXCPP_LTO_THIN"/>
<flag value="-flto=thin" if="HXCPP_LTO_THIN" unless="debug"/>
<flag value="-DHXCPP_BIG_ENDIAN" if="HXCPP_BIG_ENDIAN"/>
<flag value="-I${HXCPP}/include"/>
<!-- Removed for iOS 8 (no need) -->
<!-- <cppflag value="-frtti"/> -->
<!-- Added for iOS8 -->
<flag value="-fexceptions"/>
<flag value="-fstrict-aliasing"/>
<!-- End of Added for iOS8 -->
<outflag value="-o"/>
<ext value=".o"/>
<objdir value="obj/iphoneos${OBJGCC}${OBJDBG}${ARCH}/" />
</compiler>
<linker id="dll" exe="g++" >
<exe name="xcrun --sdk iphoneos${IPHONE_VER} g++" if="HXCPP_GCC" />
<exe name="xcrun --sdk iphoneos${IPHONE_VER} clang++" />
<flag value="-Wl,-cache_path_lto,/tmp" if="HXCPP_OPTIMIZE_LINK_INCREMENTAL" unless="debug"/>
<flag value="-stdlib=libstdc++" if="FORCE_LIBGCC" />
<flag value="-stdlib=libc++" if="HXCPP_CPP11" />
<flag value="-dynamiclib"/>
<flag value="-arch"/>
<flag value="armv6" if="HXCPP_ARMV6" />
<flag value="armv7" if="HXCPP_ARMV7" />
<flag value="armv7s" if="HXCPP_ARMV7S" />
<flag value="arm64" if="HXCPP_ARM64" />
<flag value="-isysroot"/>
<flag value="${DEVELOPER_DIR}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${IPHONE_VER}.sdk"/>
<flag value="-Wl,-undefined,dynamic_lookup"/>
<flag value="-fpic"/>
<flag value="-fPIC"/>
<flag value="-fvisibility=hidden"/>
<ext value=".ios.dylib"/>
<outflag value="-o "/>
</linker>
</xml>