diff --git a/Makefile.in b/Makefile.in index 88c82e479846..b6a93cdeb8c6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -430,7 +430,7 @@ symbols: rm -fr $(WORKDIR)/symbols/ mkdir -p $(WORKDIR)/symbols/ ifeq ($(OS),WNT) - $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/binaries/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/* + $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/* $(SRCDIR)/bin/symstore.sh else $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/* diff --git a/external/breakpad/ExternalProject_breakpad.mk b/external/breakpad/ExternalProject_breakpad.mk index 56a7be987837..db1d1c9df83a 100644 --- a/external/breakpad/ExternalProject_breakpad.mk +++ b/external/breakpad/ExternalProject_breakpad.mk @@ -16,6 +16,13 @@ $(eval $(call gb_ExternalProject_register_targets,breakpad,\ ifeq ($(COM),MSC) +$(call gb_ExternalProject_get_state_target,breakpad,build) : + $(call gb_Trace_StartRange,breakpad,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + MSBuild.exe src/tools/windows/dump_syms/dump_syms.sln -p:Configuration=Release \ + ) + $(call gb_Trace_EndRange,breakpad,EXTERNAL) + else # !ifeq($(COM),MSC) $(call gb_ExternalProject_get_state_target,breakpad,build) : diff --git a/external/breakpad/Module_breakpad.mk b/external/breakpad/Module_breakpad.mk index aeb3c42a9d6d..f68385ffb4c7 100644 --- a/external/breakpad/Module_breakpad.mk +++ b/external/breakpad/Module_breakpad.mk @@ -13,11 +13,10 @@ $(eval $(call gb_Module_add_targets,breakpad,\ UnpackedTarball_breakpad \ )) -ifneq ($(OS),WNT) $(eval $(call gb_Module_add_targets,breakpad,\ ExternalProject_breakpad \ )) -else +ifeq ($(OS),WNT) $(eval $(call gb_Module_add_targets,breakpad,\ StaticLibrary_breakpad \ )) diff --git a/external/breakpad/UnpackedTarball_breakpad.mk b/external/breakpad/UnpackedTarball_breakpad.mk index 1b804aef2eb9..4eb10158ca18 100644 --- a/external/breakpad/UnpackedTarball_breakpad.mk +++ b/external/breakpad/UnpackedTarball_breakpad.mk @@ -22,6 +22,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\ external/breakpad/breakpad-stackwalk.patch.1 \ external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 \ external/breakpad/c++20-allocator.patch \ + external/breakpad/breakpad-dump_syms.patch.1 \ +)) + +$(eval $(call gb_UnpackedTarball_add_files,breakpad,src/tools/windows/dump_syms,\ + external/breakpad/dump_syms.vcxproj \ + external/breakpad/dump_syms.sln \ )) ifeq ($(COM_IS_CLANG),TRUE) diff --git a/external/breakpad/breakpad-dump_syms.patch.1 b/external/breakpad/breakpad-dump_syms.patch.1 new file mode 100644 index 000000000000..d895be7ef57a --- /dev/null +++ b/external/breakpad/breakpad-dump_syms.patch.1 @@ -0,0 +1,34 @@ +diff -ur breakpad.org/src/common/windows/pdb_source_line_writer.cc breakpad/src/common/windows/pdb_source_line_writer.cc +--- breakpad.org/src/common/windows/pdb_source_line_writer.cc 2021-06-11 12:37:22.682324700 +0200 ++++ breakpad/src/common/windows/pdb_source_line_writer.cc 2021-06-11 12:44:24.480184800 +0200 +@@ -34,7 +34,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include +diff -ur breakpad.org/src/common/windows/pe_util.cc breakpad/src/common/windows/pe_util.cc +--- breakpad.org/src/common/windows/pe_util.cc 2021-06-11 12:37:22.682324700 +0200 ++++ breakpad/src/common/windows/pe_util.cc 2021-06-11 12:52:34.542708600 +0200 +@@ -35,6 +35,7 @@ + #include + + #include ++#include + + #include "common/windows/string_utils-inl.h" + #include "common/windows/guid_string.h" +diff -ur breakpad.org/src/tools/windows/dump_syms/dump_syms.cc breakpad/src/tools/windows/dump_syms/dump_syms.cc +--- breakpad.org/src/tools/windows/dump_syms/dump_syms.cc 2021-06-11 12:37:20.697959400 +0200 ++++ breakpad/src/tools/windows/dump_syms/dump_syms.cc 2021-06-11 12:41:16.922559700 +0200 +@@ -33,6 +33,7 @@ + #include + #include + ++#include + #include + + #include "common/windows/pdb_source_line_writer.h" diff --git a/external/breakpad/dump_syms.sln b/external/breakpad/dump_syms.sln new file mode 100644 index 000000000000..354b1783c9d5 --- /dev/null +++ b/external/breakpad/dump_syms.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31229.75 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_syms", "dump_syms.vcxproj", "{792E1530-E2C5-4289-992E-317BA30E9D9F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {792E1530-E2C5-4289-992E-317BA30E9D9F}.Debug|x86.ActiveCfg = Debug|Win32 + {792E1530-E2C5-4289-992E-317BA30E9D9F}.Debug|x86.Build.0 = Debug|Win32 + {792E1530-E2C5-4289-992E-317BA30E9D9F}.Release|x86.ActiveCfg = Release|Win32 + {792E1530-E2C5-4289-992E-317BA30E9D9F}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {86FBC9CF-7AF1-4996-BB80-EB24CCFC561A} + EndGlobalSection +EndGlobal diff --git a/external/breakpad/dump_syms.vcxproj b/external/breakpad/dump_syms.vcxproj new file mode 100644 index 000000000000..9f0fcda9efcf --- /dev/null +++ b/external/breakpad/dump_syms.vcxproj @@ -0,0 +1,108 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {792E1530-E2C5-4289-992E-317BA30E9D9F} + dumpsyms + Win32Proj + + + + Application + v142 + + + Application + v142 + + + + + + + + + + + + + <_ProjectFileVersion>16.0.31227.257 + + + Debug\ + Debug\ + true + + + Release\ + Release\ + false + + + + Disabled + $(VSInstallDir)\DIA SDK\include;..\..\..;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + EditAndContinue + + + $(VSInstallDir)\DIA SDK\lib\diaguids.lib;Dbghelp.lib;imagehlp.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + + + + $(VSInstallDir)\DIA SDK\include;..\..\..;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + MultiThreadedDLL + + Level3 + ProgramDatabase + + + $(VSInstallDir)\DIA SDK\lib\diaguids.lib;Dbghelp.lib;imagehlp.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + + + + + + + + + + + + + + + + + + + + + + +