Bug 1398897 - Move breakpad include munging to moz.build draft
authorChris Manchester <cmanchester@mozilla.com>
Fri, 15 Sep 2017 11:49:07 -0700
changeset 665610 28ae08fe3db5bbb20c452a33e4118ed4ea28bd67
parent 665609 6ff1deb6aeee3a035b45e514f9a96913d52bb1c4
child 665611 de15735b0d3cf331d2a4512b6feb7dc0705518d5
push id80119
push userbmo:cmanchester@mozilla.com
push dateFri, 15 Sep 2017 18:49:23 +0000
bugs1398897
milestone57.0a1
Bug 1398897 - Move breakpad include munging to moz.build Unfortunately this also needs to be kept in Makefile.in to handle other consumers of INCLUDES while we transition them. MozReview-Commit-ID: 9OYlu6Jv1XZ
python/mozbuild/mozbuild/compilation/database.py
toolkit/crashreporter/google-breakpad/src/common/moz.build
--- a/python/mozbuild/mozbuild/compilation/database.py
+++ b/python/mozbuild/mozbuild/compilation/database.py
@@ -49,18 +49,17 @@ class CompileDBBackend(CommonBackend):
         self._gyp_dirs = set()
 
     def consume_object(self, obj):
         # Those are difficult directories, that will be handled later.
         if obj.relativedir in (
                 'build/unix/elfhack',
                 'build/unix/elfhack/inject',
                 'build/clang-plugin',
-                'build/clang-plugin/tests',
-                'toolkit/crashreporter/google-breakpad/src/common'):
+                'build/clang-plugin/tests'):
             return True
 
         consumed = CommonBackend.consume_object(self, obj)
 
         if consumed:
             return True
 
         if isinstance(obj, DirectoryTraversal):
--- a/toolkit/crashreporter/google-breakpad/src/common/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/moz.build
@@ -59,14 +59,18 @@ if CONFIG['OS_TARGET'] == 'Android':
         'android/breakpad_getcontext.S',
     ]
     LOCAL_INCLUDES += [
         '/toolkit/crashreporter/google-breakpad/src/common/android/include',
     ]
 
 Library('breakpad_common_s')
 
+# memory.h in this dir breaks things if -I$(srcdir) gets added, since memory.h
+# is also a system header and the copy here winds up getting included instead.
+COMPILE_FLAGS['BASE_INCLUDES'] = []
+
 # We allow warnings for third-party code that can be updated from upstream.
 ALLOW_COMPILER_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')