Bug 1436845: Part 2 - Link minidump-analyzer with mozglue on Windows; r=ted
authorAaron Klotz <aklotz@mozilla.com>
Tue, 13 Feb 2018 16:03:38 -0700
changeset 761266 a9c97aa6d78903db203f80a1d6d78b1547f15297
parent 761265 ff7e21c630eb634a2d59910d8f9b95388fc35c0d
child 761267 341f20ef2627e0b19a324de14f9b32ed743bda92
push id100926
push userrwood@mozilla.com
push dateWed, 28 Feb 2018 21:51:29 +0000
reviewersted
bugs1436845
milestone60.0a1
Bug 1436845: Part 2 - Link minidump-analyzer with mozglue on Windows; r=ted I have already implemented code to check binary signatures in mozglue so that we can do so from both firefox.exe and xul.dll. Rather than including yet another implementation elsewhere, I'd rather just reuse that code by building minidump-analyzer as a GeckoProgram with Null XPCOM linkage, thus making it capable of using the mozglue implementation too. I'd also like to add this signature stuff to Mac builds at some point, so I'm trying to make this functionality as easy as possible to expand and reuse in the future.
toolkit/crashreporter/minidump-analyzer/moz.build
--- a/toolkit/crashreporter/minidump-analyzer/moz.build
+++ b/toolkit/crashreporter/minidump-analyzer/moz.build
@@ -1,16 +1,20 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['OS_TARGET'] != 'Android':
-    Program('minidump-analyzer')
+    if CONFIG['OS_TARGET'] == 'WINNT':
+        # We need mozglue on Windows for access to DLL services
+        GeckoProgram(name='minidump-analyzer', linkage=None)
+    else:
+        Program('minidump-analyzer')
 
     if CONFIG['OS_TARGET'] == 'Darwin':
         DIST_SUBDIR = 'crashreporter.app/Contents/MacOS'
 
     if CONFIG['OS_TARGET'] == 'WINNT':
         DEFINES['UNICODE'] = True
         DEFINES['_UNICODE'] = True
 
@@ -46,13 +50,12 @@ USE_LIBS += [
     'breakpad_processor',
     'jsoncpp',
 ]
 
 LOCAL_INCLUDES += [
     '/toolkit/components/jsoncpp/include',
 ]
 
-# Don't use the STL wrappers in the crashreporter clients; they don't
-# link with -lmozalloc, and it really doesn't matter here anyway.
-DisableStlWrapping()
+if CONFIG['OS_TARGET'] != 'WINNT':
+    DisableStlWrapping()
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')