Skip to content

Commit 00d04e7

Browse files
committed
Keep Debug memory/gc profile same as release to make it easier to reproduce bugs
1 parent d71061e commit 00d04e7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

toolchain/msvc-toolchain.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@
8686
<flag value="-Fd${HXCPP_BUILD_DIR}${MSVC_OBJ_DIR}/vc.pdb" unless="HXCPP_COMPILE_CACHE" tag="debug" />
8787
<flag value="-Od" tag="debug" />
8888
<flag value="-O2" tag="release" />
89+
<!-- In debug builds, add debug info to generated Haxe code (tagged "haxe,release" in Build.xml) -->
90+
<!-- Intentionally no -Od override: preserving -O2 keeps the same memory/GC profile as the crashing build -->
91+
<flag value="-Zi" if="debug" unless="HXCPP_COMPILE_CACHE" tag="haxe" />
92+
<flag value="-Z7" if="debug HXCPP_COMPILE_CACHE" tag="haxe" />
93+
<flag value="-Fd${HXCPP_BUILD_DIR}${MSVC_OBJ_DIR}/vc.pdb" if="debug" unless="HXCPP_COMPILE_CACHE" tag="haxe" />
94+
8995
<flag value="-bigobj" if="debug" />
9096
<flag value="-Zc:inline" if="HXCPP_FAST_LINK" unless="debug || HXCPP_OPTIMIZE_LINK || HXCPP_LTCG_INCREMENTAL" /><!-- not available with -Od and -GL -->
9197
<flag value="-Os" tag="optim-size" />

0 commit comments

Comments
 (0)