Bug 1508506. Set the necessary objdir include paths and defines for Eclipse CDT. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D12375

--HG--
extra : rebase_source : c72015e85b1f72ef02fff93a9d1b4aa68a5efb6f
extra : amend_source : 3191aa7c975b2d279eee6d843b47c0082d938370
This commit is contained in:
Jonathan Watt 2018-11-01 14:55:27 +00:00
Родитель 9eeeffbc02
Коммит 96f02e3f50
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -79,7 +79,12 @@ class CppEclipseBackend(CommonBackend):
# 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"]:
@ -519,7 +524,7 @@ LANGUAGE_SETTINGS_TEMPLATE_HEADER = """<?xml version="1.0" encoding="UTF-8" stan
<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>