gn: Make grit() default to requiring qualified #includes.
Once this has been in the tree for a while, we can remove all the `use_qualified_include = true` lines. BUG=401588 Review-Url: https://codereview.chromium.org/2725423002 Cr-Commit-Position: refs/heads/master@{#454918}
This commit is contained in:
@ -106,8 +106,12 @@ grit("chromecast_settings") {
|
||||
source = "//chromecast/app/resources/chromecast_settings.grd"
|
||||
resource_ids = "//chromecast/app/resources/resource_ids"
|
||||
|
||||
# TODO(thakis): Consider removing this in favor of the default directory.
|
||||
# TODO(thakis): Consider removing output_dir in favor of the default
|
||||
# directory, then it becomes possible to qualify includes of
|
||||
# grit/chromecast_settings.h and DEPS files work better too.
|
||||
# https://crbug.com/697090
|
||||
output_dir = "$root_gen_dir/chromecast_strings"
|
||||
use_qualified_include = false
|
||||
|
||||
outputs = [
|
||||
"grit/chromecast_settings.h",
|
||||
|
4
third_party/libaddressinput/BUILD.gn
vendored
4
third_party/libaddressinput/BUILD.gn
vendored
@ -14,6 +14,10 @@ config("no-newline-eof-warning") {
|
||||
|
||||
grit("strings") {
|
||||
source = "//chrome/app/address_input_strings.grd"
|
||||
|
||||
# libaddressinput's tests just say `#include "messages.h"`.
|
||||
use_qualified_include = false
|
||||
|
||||
outputs = [
|
||||
"messages.h",
|
||||
"en_messages.cc",
|
||||
|
@ -53,7 +53,7 @@
|
||||
# unique, since this can cause files from multiple grit targets to
|
||||
# overwrite each other.
|
||||
#
|
||||
# output_name (optiona)
|
||||
# output_name (optional)
|
||||
# Provide an alternate base name for the generated files, like the .d
|
||||
# files. Normally these are based on the target name and go in the
|
||||
# output_dir, but if multiple targets with the same name end up in
|
||||
@ -64,7 +64,7 @@
|
||||
# Defaults to output_dir
|
||||
#
|
||||
# use_qualified_include (optional)
|
||||
# If set, output_dir is not added to include_dirs.
|
||||
# If set to false, output_dir is added to include_dirs.
|
||||
#
|
||||
# configs (optional)
|
||||
# List of additional configs to be applied to the generated target.
|
||||
@ -351,7 +351,7 @@ template("grit") {
|
||||
# (like "mycomponent/foo.h"). This config sets up the include path.
|
||||
grit_config = target_name + "_grit_config"
|
||||
config(grit_config) {
|
||||
if (!defined(invoker.use_qualified_include) ||
|
||||
if (defined(invoker.use_qualified_include) &&
|
||||
!invoker.use_qualified_include) {
|
||||
include_dirs = [ output_dir ]
|
||||
}
|
||||
|
Reference in New Issue
Block a user