If a grit target specifies a resource_ids file of "" (this has specific meaning
documented in the grit rule), don't set the empty string as an input to the
grit action.
The only time this comes up is in the java_strings_grd template.
Review URL: https://codereview.chromium.org/1157113003
Cr-Original-Commit-Position: refs/heads/master@{#331869}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: af43f9f780b5fcca30faef007745306827d69c23
Fixes some cases where a dependency between a target's inputs and outputs exists without an explicit dependency.
json_schema_api.gni was generating wrong names, this was fixed.
mojo_application_package.gni was fixed to generate unique names (just a bug I noticed in passing) and support the testonly flag, which is necessary when I added the correct dependency.
The rest of the cases are just adding deps or making existing deps public so that the ability to depend on the target's outputs is passed to dependents.
BUG=487897
TBR=dpranke
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Previously landed as https://codereview.chromium.org/1128163007/ the issue there should have been fixed by https://codereview.chromium.org/1148173002/ which has already been landed.
Review URL: https://codereview.chromium.org/1134753011
Cr-Original-Commit-Position: refs/heads/master@{#331625}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: de262b0acc538d307f35b85f4ebf395357d1a4db
Reason for revert:
Broke Windows:
http://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN/builds/1568/steps/compile/logs/stdio
Original issue's description:
> Fix missing GN dependencies.
>
> Fixes some cases where a dependency between a target's inputs and outputs exists without an explicit dependency.
>
> json_schema_api.gni was generating wrong names, this was fixed.
>
> mojo_application_package.gni was fixed to generate unique names (just a bug I noticed in passing) and support the testonly flag, which is necessary when I added the correct dependency.
>
> The rest of the cases are just adding deps or making existing deps public so that the ability to depend on the target's outputs is passed to dependents.
>
> BUG=487897
>
> Committed: https://crrev.com/eadea21096be21b0d74c93f5b1a0ae6a9cc057d7
> Cr-Commit-Position: refs/heads/master@{#330636}
TBR=dpranke@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=487897
Review URL: https://codereview.chromium.org/1137693006
Cr-Original-Commit-Position: refs/heads/master@{#330650}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e97185bf4853d56aadf362b0a00699375b1fac76
Fixes some cases where a dependency between a target's inputs and outputs exists without an explicit dependency.
json_schema_api.gni was generating wrong names, this was fixed.
mojo_application_package.gni was fixed to generate unique names (just a bug I noticed in passing) and support the testonly flag, which is necessary when I added the correct dependency.
The rest of the cases are just adding deps or making existing deps public so that the ability to depend on the target's outputs is passed to dependents.
BUG=487897
Review URL: https://codereview.chromium.org/1128163007
Cr-Original-Commit-Position: refs/heads/master@{#330636}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: eadea21096be21b0d74c93f5b1a0ae6a9cc057d7
The first pass of moving the other Chrome-specific build flags out of the root build config file and into the new one. This requires both ffmpeg and Blink changes to finish landing.
Originally landed as https://codereview.chromium.org/1120803003/TBR=scottmg@chromium.orgTBR=ddorwin@chromium.org (widevine)
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Review URL: https://codereview.chromium.org/1123433002
Cr-Original-Commit-Position: refs/heads/master@{#327998}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2b2364bb2c6fbb88e6a4550abeb9141bc7cb949c
Originally, <if expr="enable_media_router"> was not picked up by a .grd file. I traced that to grit_rule.gni and added a check there.
Review URL: https://codereview.chromium.org/1104443002
Cr-Original-Commit-Position: refs/heads/master@{#326598}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2be1ebd65b769821ad36e6cff2d47bda574c00bb
This matches the gn name and is less confusing with use_openssl and
use_openssl_certs both existing. The preprocessor flag will follow
in another CL. For now, the old name is still defined, but not used
within Chromium.
A follow-up CL will remove deprecated use_nss and USE_NSS #defines
together which will then cause downstream churn. Though from a grep
of known downstreams, the churn seems to be fairly minimal. The
removal is split from this CL so that, if we need to revert, the
CL to revert is small.
BUG=462040
TBR=wez@chromium.org
Review URL: https://codereview.chromium.org/1085923002
Cr-Original-Commit-Position: refs/heads/master@{#325541}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0ee13e37acf707e703a380a9c1a03f0b494dd6a6
Grit's execution depends on the resource ID file, but this was not listed as a dependency in grit targets. This means that changing the resource ID file wouldn't re-run grit.
Review URL: https://codereview.chromium.org/1038213002
Cr-Original-Commit-Position: refs/heads/master@{#322531}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fd9bbb762401141baa603ef5bececbc9426da169
The MacViews browser were missing infobar and background tab assets.
mac_views_browser grit define is added so that we can include infobar assets.
Don't remap theme image ids so that Mac's background tab assets can be
found.
Map IDR_THEME_TAB_BACKGROUND_INCOGNITO to the same asset as
IDR_THEME_TAB_BACKGROUND.
BUG=425229
Review URL: https://codereview.chromium.org/983823004
Cr-Original-Commit-Position: refs/heads/master@{#321602}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c306fb9a8d5179f34589d6ab330a71ebd40eb073
In order to be able to make sure we are building the same list of targets
in both the GYP and GN builds, this patch adds new 'gn_all' and 'gyp_all'
targets.
Eventually, we should make sure that if one builds 'gn_all', then building
'gyp_all', 'All', or 'all' then has nothing to do. We're not there yet, but this
is a start.
The 'gn_all' target replaces the //:root target in the GN builds.
TBR=brettw@chromium.org
BUG=461019
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Review URL: https://codereview.chromium.org/953463003
Cr-Original-Commit-Position: refs/heads/master@{#317893}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e2ef382dd208417056acbd579620a428fa1b7af4
Reason for revert:
Suspecting this breaks Mac builds.
http://build.chromium.org/p/chromium/builders/Mac/builds/33993
Original issue's description:
> add gn_all, gyp_all targets to the build files, remove GN's //:root
>
> In order to be able to make sure we are building the same list of targets
> in both the GYP and GN builds, this patch adds new 'gn_all' and 'gyp_all'
> targets.
>
> Eventually, we should make sure that if one builds 'gn_all', then building
> 'gyp_all', 'All', or 'all' then has nothing to do. We're not there yet, but this
> is a start.
>
> The 'gn_all' target replaces the //:root target in the GN builds.
>
> R=brettw@chromium.org
> BUG=461019
> CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
>
> Committed: https://crrev.com/ff30e3de333305ccdaa103aa7f9e46765da83e99
> Cr-Commit-Position: refs/heads/master@{#317760}
TBR=brettw@chromium.org,dpranke@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=461019
Review URL: https://codereview.chromium.org/944573003
Cr-Original-Commit-Position: refs/heads/master@{#317763}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e6d374cf7ead69b3ff110f9d7dfba0dee921e6b7
In order to be able to make sure we are building the same list of targets
in both the GYP and GN builds, this patch adds new 'gn_all' and 'gyp_all'
targets.
Eventually, we should make sure that if one builds 'gn_all', then building
'gyp_all', 'All', or 'all' then has nothing to do. We're not there yet, but this
is a start.
The 'gn_all' target replaces the //:root target in the GN builds.
R=brettw@chromium.org
BUG=461019
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Review URL: https://codereview.chromium.org/936193004
Cr-Original-Commit-Position: refs/heads/master@{#317760}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ff30e3de333305ccdaa103aa7f9e46765da83e99
Using deps caused pulling a bit of mojo code to chrome.exe. That
caused weird unresolved externatls problems during Windows GN build.
Review URL: https://codereview.chromium.org/876783003
Cr-Original-Commit-Position: refs/heads/master@{#313126}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f7b4f01989be22df44d9b5475143ef98b653b1ac
For the file I'm testing with (c/b/resources/about_stats.html),
a rebuild runs 101 edges and compiles a bunch of cc files and takes 40s.
This reduces build times from 40s to 9.6s and reduces the number
of edges to 37.
BUG=439182
R=brettw@chromium.org
Review URL: https://codereview.chromium.org/740463005
Cr-Original-Commit-Position: refs/heads/master@{#306945}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9261dde33f1939f432cafe6f9654efedba4dc252
A starting point for doing all of src, and adding a PRESUBMIT.
Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/.
I haven't pushed new binaries yet.
Generated via:
> cd build
> git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat
The only things that I don't love in the current output are:
1. Turning
args = [
"--depfile", rebase_path(depfile, root_build_dir),
"--android-sdk-tools", rebased_android_sdk_build_tools,
"--dex-path", rebased_output,
]
into:
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--android-sdk-tools",
rebased_android_sdk_build_tools,
"--dex-path",
rebased_output,
]
The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well
as assignments to temporaries that are later assigned to args.
2. Turning single line
if (defined(invoker.inputs)) { inputs = invoker.inputs }
into
if (defined(invoker.inputs)) {
inputs = invoker.inputs
}
This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to
allow single line in this case is worthwhile. I think there was discussion of new syntax for this
case too, something like "inputs ?= invoker.inputs" maybe.
In both cases, I think it's worthwhile to get formatting turned on, and then go back and special
case these if we decide it's worthwhile.
R=brettw@chromium.org
BUG=348474
Review URL: https://codereview.chromium.org/766573003
Cr-Original-Commit-Position: refs/heads/master@{#306305}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b199254f481c5db36d56e83fce40594b06d2b81f
This actually hooks up (i.e. passes from invoker) several variables
controlling apk creation (version name, version code,
use_relocation_packer, use_chromium_linker, unzip_libraries_from_apk).
Adds support for overriding some configuration in the private repo.
Adds support for public_configs in grit_rule.gni.
Adds some junit targets (these are built as android libraries currently
instead of host libraries, but that just means we do a bit extra work
that we don't really need).
BUG=359249
Review URL: https://codereview.chromium.org/659703002
Cr-Original-Commit-Position: refs/heads/master@{#301039}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca675d3ec565477b2e3bae8b0709a412d029fa21
This is the new name. It has the same meaning but additionally with a "you can use the headers" permission.
Rename direct_dependent_configs to public_configs. This is the new name with identical meaning.
TBR=jamesr
Review URL: https://codereview.chromium.org/595073002
Cr-Original-Commit-Position: refs/heads/master@{#296302}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e5389527466d390b5653724a069008b9f1edcd5c
Currently this is either a list or a string. However, this is causing some problems because templates can't add to the invoker's visibility list without knowing if the original is a string or a list.
In an effort to make this consistent, I'm converting all visibiltiy to be lists, and will remove support for strings in a future build.
This exempts cld from header checking since it was confusing GN's header checker. It adds a ppapi header target as well that will be used by libyuv (that requires a roll).
TBR=scottmg
Review URL: https://codereview.chromium.org/544423002
Cr-Original-Commit-Position: refs/heads/master@{#293638}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9af4262ad8020658ee04c07d13a2617af64147b1
Previously, if you specified an empty resource ID file in the grit template in the GN build, it would send "-f" with no argument to grit, and this would cause the command line parsing to get messed up and it wouldn't generate any files.
This patch just omits the "-f" argument in this case.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/495183002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@291173 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Pull grit 171 to get the new deps fixes required to implement this.
This removes the call to grit for querying inputs completely, and enables depfile writing to enable automatic rebuilds when things are out-of-date.
Adds a new outputs variable that bypasses querying grit for outputs. This will assert that the given files exist in grit. This version allows outputs to be empty in which case it will revert to the old dynamic behavior. I'm going to land this with just the worst cases fixed to make landing easier. Then followup with converting the rest of the grit targets and removing the dynamic option.
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/407653003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@284705 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds the missing conditions to the chrome/common GN build file (previously
only the basic files were there). Some refactoring of the GYP file to make this
possible.
Renames the enable_printing flag to printing_mode since this is an integer
tri-state.
Minor improvements to chrome/renderer
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/400243003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@284508 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds support for android resources to gn.
Two new templates are introduced:
java_string_grd: This is like gyp's build/java_strings_grd.gypi. It runs
grit and generates Android strings.xml files and then zips them
together.
android_resources: This is the target for android resources. It is
mostly a wrapper around process_resources.py. This is *not part* of
android_library (like it is in gyp). Making these two things separate is
more like facebook's BUCK and google's internal build rules (and gyp's
java.gypi and java_apk.gypi have gotten way too big and complicated).
Changes to the actual build scripts are very minor except for the added
support for andoid_resources to write_build_config.py. Building
resources requires getting all the transitive resource dependencies, and
so this reuses the simple sorted transitive dependency thing from
write_ordered_libraries.py.
TBR=rch@chromium.org
BUG=359249
Review URL: https://codereview.chromium.org/361633002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@283293 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This uses the proto file directory for the generated files rather than the directory of the BUILD file. This makes it more natural when you have a BUILD file in a different directory than the proto files.
Fixes a search-and-replace error that accidentally changed the fallback source_prereqs code to use "inputs".
Fix ozone build.
BUG=
R=ajwong@chromium.org
Review URL: https://codereview.chromium.org/386943006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@282998 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This fills out a number of ui targets and does some changes to the resources to match the GYP build. In particular, we had a number of different ui/resources targets that were depended on independently. The GYP build has only one, so I combined them into a meta "ui/resources" target.
Adds a grit repack template.
TBR=ajwong
Review URL: https://codereview.chromium.org/369603004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@281087 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
components/autofill
components/metrics
components/policy
components/variations
third_party/libphonenumber
third_party/mt19937ar
ui/gfx/ipc
These are all requried to compile chrome/browser in some form or another.
Fills out all grit_defines (also required for chrome/browser) and adds associated flags for them.
Add the ability for generated_extensions_api to not generate a bundle.
Remove mt19937ar from .gitignore (it's just checked into the tree)
R=ajwong@chromium.org
Review URL: https://codereview.chromium.org/365793002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@281057 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds a lot of global enable flags for various features used by the browser.
It is not turned on because it does not compile yet. It needs some include directories and generated sources from dependencies that aren't done yet.
It is basically a line-by-line translation of the current chrome_browser.gypi. As such, it looks pretty ugly but I think keeping these in sync will be easiest.
I put in the obvious names of the GN deps. There are surely a bunch that exist in the GN build that aren't here yet but I'm going to save this for later passes.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/356303002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@280693 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
It's a goodness to sequester build configuration in the build/
directory. The gn secondary_source stuff was under tools/gn for
historical reasons, so move it to a more appropriate place.
BUG=None
TEST=do a gn build of base_unittests, run said unittests.
Review URL: https://codereview.chromium.org/340153004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@278355 4ff67af0-8c30-449e-8e8b-ad334ec8d88c