Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
brettw cac3c5e5da Annotate large GN targets for precompiled headers
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
2015-07-28 18:25:26 +00:00
dpranke 1de4e8edbc Revert "Add precompiled headers to GN build for large targets."
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
2015-07-28 00:56:41 +00:00
brettw b888f8feb6 Add precompiled headers to GN build for large targets.
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
2015-07-27 19:46:54 +00:00
kalman 7bf8f122f5 Generate all extension schema namespaces as "api" and instead vary the generated bundle names.
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.org
TBR=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
2015-07-23 18:28:16 +00:00
brettw fcbf2719e6 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
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
2015-05-27 19:43:24 +00:00
brettw fe6a3360a2 Revert of Fix missing GN dependencies. (patchset #4 id:60001 of https://codereview.chromium.org/1128163007/)
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
2015-05-19 23:15:38 +00:00
brettw 6a91c80286 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

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
2015-05-19 22:31:54 +00:00
brettw 2a7dfc5707 Make the Windows multi_dll build work in GN
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
2015-05-02 00:43:39 +00:00
dpranke 70d8c77b54 Add more size_t -> int warning fixes for the win x64 GN build.
R=brettw@chromium.org
BUG=354261

Review URL: https://codereview.chromium.org/941863002

Cr-Original-Commit-Position: refs/heads/master@{#317439}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8ec93a3ac28c857ae106a2c1929cc935ab76ec03
2015-02-20 23:36:45 +00:00
brettw e29cf3b5f1 Add unit tests target to GN build.
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
2015-02-01 02:55:04 +00:00
vchigrin 191b721614 Fix include directories in Windows GN build.
Review URL: https://codereview.chromium.org/845363002

Cr-Original-Commit-Position: refs/heads/master@{#311296}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 22779180d946d0e4d90a7ee3e6345992f2c0422b
2015-01-13 18:35:36 +00:00
scottmg fd96972e70 gn format //build
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
2014-12-02 00:25:35 +00:00
James Robinson d71695ea8f Move json schema compiler target into build/ to match gyp
ui/ and chrome/ should not depend on anything from //extensions.

R=brettw@chromium.org

Review URL: https://codereview.chromium.org/597713002

Cr-Original-Commit-Position: refs/heads/master@{#297528}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 145636c494aa8b2ea39eb86f1b9c13f9ee52f3f7
2014-09-30 22:27:41 +00:00