Move breakpad include munging to moz.build draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 17 Aug 2017 16:04:56 -0700
changeset 648551 fb0682de85ec4a032fcd7d9d025fef8fd75b2959
parent 648550 971dcf364cf988563f036b47bf79330a2acb93d9
child 648552 686561e3335b7bbfbde3f38aa85069ae73bf7810
push id74790
push userbmo:cmanchester@mozilla.com
push dateThu, 17 Aug 2017 23:05:10 +0000
milestone57.0a1
Move breakpad include munging to moz.build Unfortunately this also needs to be kept in Makefile.in to handle HOST_SOURCES 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')