New issue
Advanced search Search tips

Issue 697196 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 401588



Sign in to add a comment

Make grit produce qualified includes for resource_map_source files

Project Member Reported by thakis@chromium.org, Feb 28 2017

Issue description

We let grit produce a couple _map.cc files: https://cs.chromium.org/search/?q=_map.cc+package:%5Echromium$+file:grit&type=cs

These currently say

#include "grit/devtools_resources_map.h"

when they should say

#include "correct/qualified/path/grit/devtools_resources_map.h"



The code that writes this is at https://cs.chromium.org/chromium/src/tools/grit/grit/format/resource_map.py?type=cs&q=resource_map_source+package:%5Echromium$+file:tools/grit&l=69

I don't know if grit already knows the relative path from build root to resource_map_source output file -- if so, this should be a pretty easy change, else it requires some more plumbing.
 
Owner: thakis@chromium.org
Status: Started (was: Untriaged)
https://codereview.chromium.org/2727483004
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ca9a438e4838b7bca5fa78fe77dafb1108e0623

commit 0ca9a438e4838b7bca5fa78fe77dafb1108e0623
Author: thakis <thakis@chromium.org>
Date: Fri Mar 03 19:45:16 2017

grit: In generated _map.cc files, use relative includes.

For example, ui_resources_map.cc will now start with

  // This file is automatically generated by GRIT.  Do not edit.
  #include "ui_resources_map.h"
  #include <stddef.h>
  #include "base/macros.h"
  #include "ui_resources.h"

instead of

  // This file is automatically generated by GRIT.  Do not edit.
  #include "grit/ui_resources_map.h"
  #include <stddef.h>
  #include "base/macros.h"
  #include "grit/ui_resources.h"

Since compilers always look for header files next to the source file,
this makes it possible to build grit's output without any additional
-I flags.

BUG= 697196 

Review-Url: https://codereview.chromium.org/2727483004
Cr-Commit-Position: refs/heads/master@{#454651}

[modify] https://crrev.com/0ca9a438e4838b7bca5fa78fe77dafb1108e0623/tools/grit/grit/format/resource_map.py

Status: Fixed (was: Started)

Sign in to add a comment