Bug 1508506. Set the necessary objdir include paths and defines for Eclipse CDT. r=botond
authorJonathan Watt <jwatt@jwatt.org>
Thu, 01 Nov 2018 14:55:27 +0000
changeset 504036 53c79413e7c6bf6d1ce68b8bb307c9c2a71c8ac5
parent 504035 18d939404b3110b1de9b4078350a8c4e31afe534
child 504037 27fe8b1767f2acc452f47ca8a948902b0ebf7a51
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1508506
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508506. Set the necessary objdir include paths and defines for Eclipse CDT. r=botond Differential Revision: https://phabricator.services.mozilla.com/D12375
python/mozbuild/mozbuild/backend/cpp_eclipse.py
--- a/python/mozbuild/mozbuild/backend/cpp_eclipse.py
+++ b/python/mozbuild/mozbuild/backend/cpp_eclipse.py
@@ -74,17 +74,22 @@ class CppEclipseBackend(CommonBackend):
         return os.path.join(srcdir_parent, workspace_dirname)
 
     def consume_object(self, obj):
         reldir = getattr(obj, 'relsrcdir', None)
 
         # Note that unlike VS, Eclipse' indexer seem to crawl the headers and
         # isn't picky about the local includes.
         if isinstance(obj, ComputedFlags):
-            args = self._args_for_dirs.setdefault(reldir, {'includes': [], 'defines': []})
+            args = self._args_for_dirs.setdefault('tree/' + reldir, {'includes': [], 'defines': []})
+            # use the same args for any objdirs we include:
+            if reldir == 'dom/bindings':
+                self._args_for_dirs.setdefault('generated-webidl', args)
+            if reldir == 'ipc/ipdl':
+                self._args_for_dirs.setdefault('generated-ipdl', args)
 
             includes = args["includes"]
             if "BASE_INCLUDES" in obj.flags and obj.flags["BASE_INCLUDES"]:
                 includes += obj.flags["BASE_INCLUDES"]
             if "LOCAL_INCLUDES" in obj.flags and obj.flags["LOCAL_INCLUDES"]:
                 includes += obj.flags["LOCAL_INCLUDES"]
 
             defs = args["defines"]
@@ -514,17 +519,17 @@ WORKSPACE_LANGUAGE_SETTINGS_TEMPLATE = "
 LANGUAGE_SETTINGS_TEMPLATE_HEADER = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <project>
 	<configuration id="0.1674256904" name="Default">
 		<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
 			<provider class="org.eclipse.cdt.core.language.settings.providers.LanguageSettingsGenericProvider" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" name="CDT User Setting Entries" prefer-non-shared="true" store-entries-with-project="true">
 				<language id="org.eclipse.cdt.core.g++">
 """
 
-LANGUAGE_SETTINGS_TEMPLATE_DIR_HEADER = """					<resource project-relative-path="tree/@RELATIVE_PATH@">
+LANGUAGE_SETTINGS_TEMPLATE_DIR_HEADER = """					<resource project-relative-path="@RELATIVE_PATH@">
 						<entry kind="includeFile" name="@PREINCLUDE_FILE_PATH@">
 							<flag value="LOCAL"/>
 						</entry>
 """
 
 LANGUAGE_SETTINGS_TEMPLATE_DIR_INCLUDE = """						<entry kind="includePath" name="@INCLUDE_PATH@">
 							<flag value="LOCAL"/>
 						</entry>