205 lines
7.8 KiB
XML
205 lines
7.8 KiB
XML
<xml>
|
|
|
|
|
|
<!-- WINDOWS TOOLS -------------------------------------->
|
|
|
|
|
|
|
|
<set name="USE_PRECOMPILED_HEADERS" value="msvc" unless="NO_PRECOMPILED_HEADERS" />
|
|
|
|
<section if="winrt">
|
|
<set name="ABI" value="-ZW" unless="ABI" />
|
|
<set name="C_ABI" value="-MD" />
|
|
</section>
|
|
<section unless="winrt">
|
|
<set name="ABI" value="-MT" unless="ABI" />
|
|
<set name="C_ABI" value="${ABI}" />
|
|
</section>
|
|
<set name="CPP_ABI" value="${ABI}" />
|
|
|
|
<unset name="HXCPP_WINXP_COMPAT" if="HXCPP_ARM64" />
|
|
|
|
<set name="XPOBJ" value="xp" if="HXCPP_WINXP_COMPAT" />
|
|
|
|
|
|
<set name="OBJCACHE" value="-c" if="HXCPP_COMPILE_CACHE"/>
|
|
|
|
<unset name="HXCPP_FORCE_PDB_SERVER" if="HXCPP_COMPILE_CACHE" />
|
|
|
|
<set name="SUBSYSTEMWINDOWS" value="1" if="no_console" unless="HXCPP_DEBUGGER" />
|
|
<set name="SUBSYSTEMCONSOLE" value="1" unless="SUBSYSTEMWINDOWS" />
|
|
|
|
<section if="HXCPP_WINXP_COMPAT">
|
|
<set name="SUBSYSTEM_VER" value=",5.01" unless="HXCPP_M64" />
|
|
<set name="SUBSYSTEM_VER" value=",5.02" if="HXCPP_M64" />
|
|
</section>
|
|
<set name="SUBSYSTEM_VER" value=",6.02" if="HXCPP_ARM64" />
|
|
|
|
<set name="MSVC_OBJ_DIR" value="obj/msvc${MSVC_VER}${OBJEXT}${OBJCACHE}${XPOBJ}" unless="winrt" />
|
|
<set name="MSVC_OBJ_DIR" value="obj/msvc${MSVC_VER}-rt${OBJEXT}${OBJCACHE}${XPOBJ}" if="winrt" />
|
|
<set name="MSVC_OBJ_DIR" value="obj/msvc${MSVC_VER}-arm${OBJEXT}${OBJCACHE}${XPOBJ}" if="HXCPP_ARM64" />
|
|
|
|
<set name="MACHINE" value="x86" />
|
|
<set name="MACHINE" value="x64" if="HXCPP_M64" />
|
|
<set name="MACHINE" value="ARM64" if="HXCPP_ARM64" />
|
|
|
|
<!-- Seem vc does not know how to start its own pdbserver in 64 bit mode -->
|
|
<setup name="pdbserver" if="HXCPP_DEBUG_LINK HXCPP_HACK_PDBSRV HXCPP_FORCE_PDB_SERVER" />
|
|
|
|
<set name="MSVC_ARCH" value="SSE2" unless="HXCPP_M64" />
|
|
|
|
<set name="HXCPP_LTCG_INCREMENTAL" value="1" if="HXCPP_OPTIMIZE_LINK_INCREMENTAL"/>
|
|
<unset name="HXCPP_FAST_LINK" if="HXCPP_FAST_LINK" unless="MSVC19"/>
|
|
|
|
<compiler id="MSVC" exe="cl.exe" if="windows">
|
|
<flag value="-nologo"/>
|
|
|
|
|
|
<!-- Newer options -->
|
|
<!-- <flag value = "/analyze-" if="MSVC17+" /> -->
|
|
<flag value = "/WX-" if="MSVC17+" />
|
|
<flag value = "/fp:precise" if="MSVC17+" />
|
|
<flag value = "-DWINAPI_FAMILY=WINAPI_FAMILY_APP" if="winrt" />
|
|
<flag value = "-DHX_WINRT" if="winrt" />
|
|
<flag value = "-errorReport:prompt" if="winrt" />
|
|
|
|
<cflag value="${C_ABI}" />
|
|
<cppflag value="${CPP_ABI}" />
|
|
<flag value="-DHX_WINDOWS"/>
|
|
<flag value="-DHXCPP_BIG_ENDIAN" if="HXCPP_BIG_ENDIAN"/>
|
|
<flag value="-D${HXCPP_XP_DEFINE}" if="HXCPP_XP_DEFINE"/>
|
|
<flag value="-GR"/>
|
|
|
|
<!-- standard optimization flags -->
|
|
<flag value="-Od" if="debug" tag="optim-std" />
|
|
<flag value="-O2" unless="debug" tag="optim-std" />
|
|
<section if="HXCPP_DEBUG_LINK">
|
|
<flag value="-Zi" unless="HXCPP_COMPILE_CACHE" tag="optim-std" />
|
|
<flag value="-Z7" if="HXCPP_COMPILE_CACHE" tag="optim-std" />
|
|
<flag value="-Fd${HXCPP_BUILD_DIR}${MSVC_OBJ_DIR}/vc.pdb" unless="HXCPP_COMPILE_CACHE" tag="optim-std" />
|
|
</section>
|
|
|
|
<!-- non-standard optimization flags -->
|
|
<flag value="-Zi" unless="HXCPP_COMPILE_CACHE" tag="debug" />
|
|
<flag value="-Z7" if="HXCPP_COMPILE_CACHE" tag="debug" />
|
|
<flag value="-Fd${HXCPP_BUILD_DIR}${MSVC_OBJ_DIR}/vc.pdb" unless="HXCPP_COMPILE_CACHE" tag="debug" />
|
|
<flag value="-Od" tag="debug" />
|
|
<flag value="-O2" tag="release" />
|
|
<flag value="-bigobj" if="debug" />
|
|
<flag value="-Zc:inline" if="HXCPP_FAST_LINK" unless="debug || HXCPP_OPTIMIZE_LINK || HXCPP_LTCG_INCREMENTAL" /><!-- not available with -Od and -GL -->
|
|
<flag value="-Os" tag="optim-size" />
|
|
<flag value="-GL" if="HXCPP_OPTIMIZE_LINK || HXCPP_LTCG_INCREMENTAL" unless="debug"/>
|
|
|
|
<flag value="-FS" if="HXCPP_FORCE_PDB_SERVER" />
|
|
<flag value="-Oy-"/>
|
|
<flag value="-c"/>
|
|
<flag value="-EHa" if="HXCPP_CATCH_SEGV" />
|
|
<flag value="-EHs" unless="HXCPP_CATCH_SEGV || winrt"/>
|
|
<flag value="-EHsc" if="winrt" unless="HXCPP_CATCH_SEGV" />
|
|
<flag value="-GS-"/>
|
|
<flag value="-arch:${MSVC_ARCH}" if="MSVC_ARCH" />
|
|
<flag value="-I${HXCPP}/include"/>
|
|
<include name="toolchain/common-defines.xml" />
|
|
<flag value="-D_CRT_SECURE_NO_DEPRECATE"/>
|
|
<flag value="-D_ALLOW_MSC_VER_MISMATCH"/>
|
|
<flag value="-D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH"/>
|
|
<flag value="-DHX_WIN_MAIN" if="SUBSYSTEMWINDOWS" tag="main" />
|
|
<flag value="-wd4996"/>
|
|
<outflag value="-Fo"/>
|
|
<ext value=".obj"/>
|
|
<objdir value="${MSVC_OBJ_DIR}" />
|
|
|
|
<rcexe name="rc.exe" />
|
|
<rcext value=".res" />
|
|
<rcflag value="-nologo" />
|
|
|
|
<getversion value="cl.exe"/>
|
|
</compiler>
|
|
|
|
<linker id="dll" exe="link.exe" if="windows">
|
|
<flag value="-nologo"/>
|
|
<flag value="-machine:${MACHINE}"/>
|
|
<flag value="-dll"/>
|
|
<flag value="-debug:full" if="HXCPP_DEBUG_LINK" unless="HXCPP_FAST_LINK"/>
|
|
<flag value="-debug:fastlink" if="HXCPP_FAST_LINK HXCPP_DEBUG_LINK"/>
|
|
<flag value="-OPT:REF,ICF" if="HXCPP_PDB_FILE"/>
|
|
<flag value="-pdb:${HXCPP_PDB_FILE}" if="HXCPP_PDB_FILE" />
|
|
<flag value="-LTCG" if="HXCPP_OPTIMIZE_LINK" unless="debug || HXCPP_LTCG_INCREMENTAL"/>
|
|
<flag value="-LTCG:INCREMENTAL" if="HXCPP_LTCG_INCREMENTAL" unless="debug"/>
|
|
<flag value="-map:${HXCPP_MAP_FILE}" if="HXCPP_MAP_FILE" />
|
|
<lib name="${dll_import_link}" if="dll_import_link" />
|
|
<ext value=".dll"/>
|
|
<libdir name="obj/lib"/>
|
|
<flag value="-libpath:lib"/>
|
|
<fromfile value="@"/>
|
|
<outflag value="-out:"/>
|
|
<flag value="user32.lib"/>
|
|
<libpathflag value="-libpath:"/>
|
|
</linker>
|
|
|
|
<linker id="exe" exe="link.exe" unless="winrt">
|
|
<fromfile value="@"/>
|
|
<flag value="-nologo"/>
|
|
<flag value="-machine:${MACHINE}"/>
|
|
<flag value="-debug" if="HXCPP_DEBUG_LINK||HXCPP_PDB_FILE" unless="HXCPP_FAST_LINK"/>
|
|
<flag value="-debug:fastlink" if="HXCPP_FAST_LINK HXCPP_DEBUG_LINK"/>
|
|
<flag value="-OPT:REF,ICF" if="HXCPP_PDB_FILE"/>
|
|
<flag value="-map:${HXCPP_MAP_FILE}" if="HXCPP_MAP_FILE" />
|
|
<flag value="-pdb:${HXCPP_PDB_FILE}" if="HXCPP_PDB_FILE" />
|
|
<flag value="-INCREMENTAL:NO" if="HXCPP_PDB_FILE" />
|
|
<flag value="-LTCG" if="HXCPP_OPTIMIZE_LINK" unless="debug || HXCPP_LTCG_INCREMENTAL"/>
|
|
<flag value="-LTCG:INCREMENTAL" if="HXCPP_LTCG_INCREMENTAL" unless="debug"/>
|
|
<flag value="-subsystem:windows${SUBSYSTEM_VER}" if="SUBSYSTEMWINDOWS" />
|
|
<flag value="-subsystem:console${SUBSYSTEM_VER}" if="SUBSYSTEMCONSOLE" />
|
|
<libpathflag value="-libpath:"/>
|
|
<flag value="-libpath:lib"/>
|
|
<flag value="user32.lib"/>
|
|
<ext value=".exe"/>
|
|
<outflag value="-out:"/>
|
|
</linker>
|
|
|
|
|
|
<manifest exe="mt.exe" >
|
|
<flag value="-nologo"/>
|
|
<flag value="-manifest"/>
|
|
<outPre value="-outputresource:" />
|
|
<outPost value=";1" />
|
|
</manifest>
|
|
|
|
|
|
|
|
<linker id="exe" exe="link.exe" if="winrt">
|
|
<fromfile value="@"/>
|
|
<flag value="-nologo"/>
|
|
<flag value="-machine:${MACHINE}"/>
|
|
<flag value="-debug" if="HXCPP_DEBUG_LINK" unless="HXCPP_FAST_LINK"/>
|
|
<flag value="-debug:fastlink" if="HXCPP_FAST_LINK HXCPP_DEBUG_LINK"/>
|
|
<flag value="-LTCG" if="HXCPP_OPTIMIZE_LINK" unless="debug || HXCPP_LTCG_INCREMENTAL"/>
|
|
<flag value="-LTCG:INCREMENTAL" if="HXCPP_LTCG_INCREMENTAL" unless="debug"/>
|
|
<flag value="-subsystem:windows" />
|
|
<flag value="-MANIFEST:NO" />
|
|
<flag value="-WINMD" />
|
|
<flag value="-APPCONTAINER" />
|
|
<flag value="-WINMDFILE:${MSVC_OBJ_DIR}/app.winmd" />
|
|
<flag value="-DYNAMICBASE" />
|
|
<flag value="-NXCOMPAT" />
|
|
<flag value="-libpath:lib"/>
|
|
<libpathflag value="-libpath:"/>
|
|
<flag value="user32.lib"/>
|
|
<ext value=".exe"/>
|
|
<outflag value="-out:"/>
|
|
</linker>
|
|
|
|
<linker id="static_link" exe="lib.exe" if="windows">
|
|
<flag value="-LTCG" if="HXCPP_OPTIMIZE_LINK" unless="debug || HXCPP_LTCG_INCREMENTAL"/>
|
|
<flag value="-LTCG:INCREMENTAL" if="HXCPP_LTCG_INCREMENTAL" unless="debug"/>
|
|
<fromfile value="@"/>
|
|
<flag value="-nologo"/>
|
|
<flag value="-IGNORE:4264" if="winrt" />
|
|
<ext value="${LIBEXT}"/>
|
|
<outflag value="-out:"/>
|
|
</linker>
|
|
|
|
|
|
</xml>
|