Adds the precompiled header config to most large-ish targets in the build, but keeps the config a no-op (so no precompiled headers will be used but this can bw switched with a one-line change).
Removes Windows files from the precompiled header. This does not seem to affect the build speed much because most Chrome files don't depend on Windows any more. And windows.h injects typedefs and defines that conflict with some third party libraries and prevent using precompiled headers for those targets or any target that includes them.
I counted ~50 files or bigger as large. The 50 file threshold is based on some previous approximate measurements (since the precompile step is an extra per-target compile, it can actually make small targets compile slower).
For borderline cases, I added the precompiled header flag if I thought it was likely to have more files added, and didn't add it if I thought the target was likely to be static.
This is a reland of https://codereview.chromium.org/1250273002/ with the config disabled for easier re-landing and iterating
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
TBR=dpranke
Review URL: https://codereview.chromium.org/1258273004
Cr-Original-Commit-Position: refs/heads/master@{#340728}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bc8b2a244ab981b264a86f5f2a64464089e05e32
This reverts commit 8f3218985dde74063ccc362da47803be163f3165.
It looks like this may have broken incremental builds on Win.
TBR=brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1256223003
Cr-Original-Commit-Position: refs/heads/master@{#340620}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7ba63a918a644773af77dc657792d6440e8afbc1
Turns on precompiled header support in the GN build on Windows, and adds the precompiled header config to most large-ish targets in the build.
Removes Windows files from the precompiled header. This does not seem to affect the build speed much because most Chrome files don't depend on Windows any more. And windows.h injects typedefs and defines that conflict with some third party libraries and prevent using precompiled headers for those targets or any target that includes them.
I counted ~50 files or bigger as large. The 50 file threshold is based on some previous approximate measurements (since the precompile step is an extra per-target compile, it can actually make small targets compile slower).
For borderline cases, I added the precompiled header flag if I thought it was likely to have more files added, and didn't add it if I thought the target was likely to be static.
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1250273002
Cr-Original-Commit-Position: refs/heads/master@{#340535}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8f3218985dde74063ccc362da47803be163f3165
At the moment the 3 modules that use extension API schemas, those in
extensions/common/api, chrome/common/extensions/api, and extensions/shell/api,
are generated with different C++ namespaces: "core_api", "api", and
"shell::api" respectively.
This is a pointless distinction to make since as far as JS is concerned they
must all go on the window.chrome object, therefore namespace conflicts are
impossible. It just ends up adding code noise.
The only problem it solves is that all bundle compiles are generated to the
same name, "GeneratedSchemas" and "GeneratedFunctionRegistry". This patch
solves that a different way, by adding a JSON schema compiler option to give
those generated classes a prefix such that they are "GeneratedSchemas",
"ChromeGeneratedSchemas", and "ShellGeneratedSchemas" respectively.
This lets us to a global substitution from "core_api" to just "api".
R=rockot@chromium.org, dpranke@chromium.orgTBR=ben@chromium.org
Review URL: https://codereview.chromium.org/1226353004
Cr-Original-Commit-Position: refs/heads/master@{#340119}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e58e6223146f09405229146fce6c1bfe6b71e4ce
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
This patch still keeps the flag disabled, I will toggle that in a separate patch to reduce risk.
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/1122613002
Cr-Original-Commit-Position: refs/heads/master@{#328031}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 22488ada37ee94a2e774bbbeb10b0f8f8ea19275
Minor related GYP cleanup and added some missing dependencies and related targets to the GN build.
Support for compiling unit_tests with no ENABLE_WEBRTC.
Remove browser_action_drag_data_unittest.cc which is not compiled on any currently supported platform.
BUG=
Review URL: https://codereview.chromium.org/880873003
Cr-Original-Commit-Position: refs/heads/master@{#314078}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a68ea2b7bba60fe9dcda30d2ad0a8fe7fb65d3ba
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