Index: client/crashpad_info.cc |
diff --git a/client/crashpad_info.cc b/client/crashpad_info.cc |
index 507c5005e0855d53fbfdac4189928c98dd0ce98c..540ec411f9cd60412903e412d59eab7e6056aa2c 100644 |
--- a/client/crashpad_info.cc |
+++ b/client/crashpad_info.cc |
@@ -14,10 +14,14 @@ |
#include "client/crashpad_info.h" |
-#include <mach-o/loader.h> |
- |
#include "util/stdlib/cxx.h" |
+#if defined(OS_MAC) |
Mark Mentovai
2014/12/15 23:38:34
#include "build/build_config.h" to use this.
The
scottmg
2014/12/16 00:18:07
Done. I'm unclear on the guidance for this. It mus
Mark Mentovai
2014/12/16 14:14:14
scottmg wrote:
|
+#include <mach-o/loader.h> |
+#elif defined(OS_WIN) |
+#include <windows.h> |
+#endif |
+ |
#if CXX_LIBRARY_VERSION >= 2011 |
#include <type_traits> |
#endif |
@@ -45,6 +49,8 @@ union Compile_Assert { |
}; |
#endif |
+#if defined(OS_MAC) |
+ |
// Put the structure in __DATA,__crashpad_info where it can be easily found |
Mark Mentovai
2014/12/15 23:38:34
Aside from the actual section name, this comment’s
scottmg
2014/12/16 00:18:07
Improved.
I removed the Windows pragmas for now a
|
// without having to consult the symbol table. The “used” attribute prevents it |
// from being dead-stripped. This isn’t placed in an unnamed namespace: |
@@ -60,6 +66,14 @@ __attribute__((section(SEG_DATA ",__crashpad_info"), |
used, |
visibility("hidden"))) CrashpadInfo g_crashpad_info; |
+#elif defined(OS_WIN) |
+ |
+#pragma data_seg(push, crashpad_info, "__crashpad_info") |
+CrashpadInfo g_crashpad_info; |
+#pragma data_seg(pop, crashpad_info) |
+ |
+#endif |
+ |
// static |
CrashpadInfo* CrashpadInfo::GetCrashpadInfo() { |
return &g_crashpad_info; |