From 6ea961ed050d33bc7a953932b947844286e9e15c Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 12 Sep 2018 11:22:20 -0700 Subject: [PATCH] Patch to fix debugging on Windows x64 --- tools/platforms/WindowsPlatform.hx | 32 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/tools/platforms/WindowsPlatform.hx b/tools/platforms/WindowsPlatform.hx index a2accd813..29768a87d 100644 --- a/tools/platforms/WindowsPlatform.hx +++ b/tools/platforms/WindowsPlatform.hx @@ -406,20 +406,6 @@ class WindowsPlatform extends PlatformTarget { var commands = []; - if (!targetFlags.exists ("32") && System.hostArchitecture == X64) { - - if (targetFlags.exists ("winrt")) { - - commands.push ([ "-Dwinrt", "-DHXCPP_M64" ]); - - } else { - - commands.push ([ "-Dwindows", "-DHXCPP_M64" ]); - - } - - } - if (!targetFlags.exists ("64") && (command == "rebuild" || System.hostArchitecture == X86)) { if (targetFlags.exists ("winrt")) { @@ -434,6 +420,24 @@ class WindowsPlatform extends PlatformTarget { } + // TODO: Compiling with -Dfulldebug overwrites the same "-debug.pdb" + // as previous Windows builds. For now, force -64 to be done last + // so that it can be debugged in a default "rebuild" + + if (!targetFlags.exists ("32") && System.hostArchitecture == X64) { + + if (targetFlags.exists ("winrt")) { + + commands.push ([ "-Dwinrt", "-DHXCPP_M64" ]); + + } else { + + commands.push ([ "-Dwindows", "-DHXCPP_M64" ]); + + } + + } + CPPHelper.rebuild (project, commands); }