114 lines
4.7 KiB
XML
Raw Normal View History

2025-01-22 16:18:30 +01:00
<xml>
<!-- MACOS TOOLS -->
<set name="HXCPP_USE_LIBTOOL" value="1" />
<set name="HXCPP_CPP11" value="1" unless="HXCPP_NO_CPP11 || HXCPP_CPP14" />
<include name="toolchain/gcc-toolchain.xml"/>
<setenv name="MACOSX_DEPLOYMENT_TARGET" value="10.9" if="HXCPP_CPP11||HXCPP_CPP14" unless="MACOSX_DEPLOYMENT_TARGET"/>
<setenv name="MACOSX_DEPLOYMENT_TARGET" value="10.7" if="OBJC_ARC" unless="MACOSX_DEPLOYMENT_TARGET" />
<setenv name="MACOSX_DEPLOYMENT_TARGET" value="10.6" unless="MACOSX_DEPLOYMENT_TARGET" />
<path name="${DEVELOPER_DIR}/usr/bin" />
<set name="HXCPP_LTO_THIN" value="1" if="HXCPP_OPTIMIZE_LINK_INCREMENTAL"/>
<set name="STDLIBCPP" value="1" unless="HXCPP_GCC || HXCPP_CPP11 || HXCPP_CPP14" />
<section unless="HXCPP_ARCH">
<set name="HXCPP_ARCH" value="arm64" if="HXCPP_ARM64"/>
<set name="HXCPP_ARCH" value="x86" if="HXCPP_M32"/>
<set name="HXCPP_ARCH" value="x86_64" unless="HXCPP_ARCH"/>
</section>
<compiler id="darwin" exe="g++" if="macos">
<exe name="xcrun --sdk macosx${MACOSX_VER} clang++" if="HXCPP_CLANG" />
<flag value="-c"/>
<flag value="-fvisibility=hidden"/>
<cppflag value="-std=c++11" if="HXCPP_CPP11"/>
<cppflag value="-std=c++14" if="HXCPP_CPP14"/>
<cppflag value="-Wc++14-extensions" if="HXCPP_CPP14"/>
<flag value="-stdlib=libc++" unless="STDLIBCPP" />
<flag value="-stdlib=libstdc++" if="STDLIBCPP" />
<cppflag value="-frtti"/>
<pchflag value="-x" />
<pchflag value="c++-header" />
<flag value="-Qunused-arguments" if="LEGACY_MACOSX_SDK"/>
<flag value="-isysroot" unless="LEGACY_MACOSX_SDK"/>
<flag value="${DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MACOSX_VER}.sdk" unless="LEGACY_MACOSX_SDK"/>
<flag value="-g" if="debug"/>
<flag value="-O2" unless="debug"/>
<flag value="-I${HXCPP}/include"/>
<flag value="-DHX_MACOS"/>
<flag value="-arch" />
<flag value="${HXCPP_ARCH}"/>
<flag value="-DHXCPP_BIG_ENDIAN" if="HXCPP_BIG_ENDIAN"/>
<flag value="-Wno-parentheses" />
<flag value="-Wno-null-dereference" if="HXCPP_CLANG"/>
<flag value="-Wno-unused-value" />
<flag value="-Wno-format-extra-args" />
<flag value="-Wno-overflow" />
<flag value="-fsanitize=thread" if="HXCPP_THREAD_SANITIZE" />
<cppflag value="-Wno-invalid-offsetof" />
<cppflag value="-Wno-return-type-c-linkage" />
<mmflag value="-Wno-return-type-c-linkage" />
<flag value="-Wno-bool-conversion" if="HXCPP_CLANG"/>
<flag value="-fobjc-arc" if="OBJC_ARC" />
<flag value="-DOBJC_ARC" if="OBJC_ARC" />
<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"/>
<objdir value="obj/darwin${OBJEXT}/" />
<flag value="-msse4.1" if="HXCPP_SSE4" unless="HXCPP_ARM" />
<outflag value="-o"/>
<ext value=".o"/>
<getversion value="xcrun --sdk macosx${MACOSX_VER} clang++ -v" if="HXCPP_CLANG" />
</compiler>
<linker id="dll" exe="g++" if="macos">
<exe name="xcrun --sdk macosx${MACOSX_VER} clang++" if="HXCPP_CLANG" />
<fromfile value="" if="GCC_OLD" />
<flag value="-Wl,-bundle,-bundle_loader,${dll_import_link}" if="dll_import_link" />
<flag value="-Wl,-cache_path_lto,/tmp" if="HXCPP_LTO_THIN" unless="debug"/>
<flag value="-stdlib=libc++" unless="STDLIBCPP" />
<flag value="-stdlib=libstdc++" if="STDLIBCPP" />
<flag value="-fpic"/>
<flag value="-fPIC"/>
<flag value="-dynamiclib"/>
<flag value="-arch" />
<flag value="${HXCPP_ARCH}"/>
<flag value="-framework"/>
<flag value="Cocoa"/>
<flag value="-isysroot" unless="LEGACY_MACOSX_SDK"/>
<flag value="${DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MACOSX_VER}.sdk" unless="LEGACY_MACOSX_SDK"/>
<flag value="-fvisibility=hidden"/>
<!-- <flag value="-debug" if="debug"/> -->
<ext value=".dylib"/>
<outflag value="-o "/>
</linker>
<linker id="exe" exe="g++" if="macos">
<exe name="xcrun --sdk macosx${MACOSX_VER} clang++" if="HXCPP_CLANG" />
<!-- <flag value="-Wl,-stack_size,0x8000"/> -->
<flag value="-rpath" />
<flag value="@executable_path"/>
<flag value="-Wl,-rpath,${HXCPP_RPATH}" if="HXCPP_RPATH" />
<flag value="-Wl,-cache_path_lto,/tmp" if="HXCPP_OPTIMIZE_LINK_INCREMENTAL" unless="debug"/>
<fromfile value="" if="GCC_OLD" />
<flag value="-stdlib=libstdc++" if="STDLIBCPP" />
<flag value="-framework"/>
<flag value="Cocoa"/>
<flag value="-isysroot" unless="LEGACY_MACOSX_SDK"/>
<flag value="${DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MACOSX_VER}.sdk" unless="LEGACY_MACOSX_SDK"/>
<flag value="-fsanitize=thread" if="HXCPP_THREAD_SANITIZE" />
<!-- <flag value="-debug" if="debug"/> -->
<flag value="-arch" />
<flag value="${HXCPP_ARCH}"/>
<ext value=""/>
<outflag value="-o "/>
</linker>
</xml>