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

19 Коммитов

Автор SHA1 Сообщение Дата
dcheng dc0b2a3f2b Enable template checking for the clang plugin on Android.
This enables the plugin to check templated classes for the following
things:
- Refcounted types have private destructors.
- WeakPtrFactory members are the last members

BUG=441916

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

Cr-Original-Commit-Position: refs/heads/master@{#331907}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b0dad9e37be79905855ac637a041429775582edd
2015-05-29 01:41:18 +00:00
dcheng b479aedae5 Enable template checking for the clang plugin on Mac.
This enables the plugin to check templated classes for the following
things:
- virtual functions have {virtual,override,final} correctly specified.
- Refcounted types have private destructors.
- WeakPtrFactory members are the last members

BUG=441916

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

Cr-Original-Commit-Position: refs/heads/master@{#331743}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dcf757517b8b95793c0aff1509cb356cdcbd59e9
2015-05-28 05:22:07 +00:00
dcheng 2024495bbc Enable template checking for the clang plugin on Linux.
This enables the plugin to check templated classes for the following
things:
- virtual functions have {virtual,override,final} correctly specified.
- Refcounted types have private destructors.
- WeakPtrFactory members are the last members

BUG=441916

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

Cr-Original-Commit-Position: refs/heads/master@{#331210}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0d701b22f23d3ffc0ef40ff343a1128b64ec392d
2015-05-23 00:10:29 +00:00
Daniel Cheng 3e96135e62 Make clang plugin diagnostics errors again on Windows GN builds.
BUG=467287
R=thakis@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#331121}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7b3638806824d77dd66453029df40fa99772e863
2015-05-22 16:41:39 +00:00
hans 752e0a8901 Clang style plugin: add warn-only option and use it on Windows
This will allow us to flip a flag to enable warnings-as-errors once
the Windows code is cleaned up enough without building a new plugin
binary.

Also, try not to compute the diagnostic level in multiple places.

BUG=467287, 483065

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

Cr-Original-Commit-Position: refs/heads/master@{#327852}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a7ae971275f2aa0a7a6501c72b571939c44baa2b
2015-05-01 01:02:53 +00:00
Daniel Cheng 6fc175a23a Use the Clang plugin on Windows.
BUG=467287
R=thakis@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#325465}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2fcc20f4d2d51a8527af2f0f1dbe0a8bd6fb6809
2015-04-16 17:30:11 +00:00
ncbray 8b78f0bf7e GN: prevent Clang plugins from being injected into NaCl toolchains.
BUG=https://code.google.com/p/chromium/issues/detail?id=401761

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

Cr-Original-Commit-Position: refs/heads/master@{#307289}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: aa0a9e54e921229cd58420cc8652a0859a0d702c
2014-12-08 18:44:21 +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
brettw@chromium.org 4f534c4550 Redo GN "args" command
Previously "gn args" printed build arguments. That has now moved to "gn args <outdir> --list" along with a new --short mode that's a bit more convenient for some uses.

Now "gn args" runs your editor on the build arguments for the given output directory, and re-generates the build given those arguments. This is an easier way to manage changing build arguments for a build (previously you would have to re-type everything or edit build.ninja manually).

"gn gen" now always uses the existing arguments for the given output dir, unless "--args" is manually specified (giving the old behavior of just using those). This also allows a more convenient way for a user to recover from a borked build (sincetimes I ran into a state where something was missing that prevent ninja from even starting enough to rebuild the build).

I removed the "show" and "refresh" ninja phony rules since the new commands cover those cases.

This patch adds some additional tracing to build startup since I noticed it was missing when trying to figure out why the args command was so slow (I fixed the main reason, it was with new code I added).

Added proper escaping for printing string values and unit tests for these.

Two minor build file fixes.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@268042 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-03 04:32:19 +00:00
brettw@chromium.org ae1a01fcb6 Hook up WebKit WTF to GN build.
This also moves the "use clang plugins" flag to a GNI file so it can be shared (WebKit needs to read this flag).

TBR=scottmg

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@265940 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-24 16:44:04 +00:00
brettw@chromium.org 70ae79bcd5 Work on Mac GN build.
This fixes a lot of minor mistakes (mostly missing/extra files and flags) for the Mac GN build.

I separated out some clang flags into a config for extra clang warnings. Several of the third party libraries needed to remove this.

Removes the use_nss flag and uses !use_openssl. This is a result of discussion with rsleevi.

Removes extra duplicate net build file from secondary tree.

ui/gesture_events seems to be getting compiled in GN with more strict warnings than in GYP. Rather than fix this, I fixed the warning in the gesture recognizer unit test. It was returning a const copy (the const is pointless when you're copying).

This also removes a bunch of old GYP integration stuff that was left in the GN build.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@264626 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-17 20:33:19 +00:00
brettw@chromium.org d80b402bc9 Pull GN @ 252040, update calls
Updates all rebase_path calls to use the new parameter ordering.

Use the new getenv function and delete the Python script we had to get the home directory.

Takes advantage of the new ability to have the default value of declare_args blocks be dependent on other values. This simplifies some code.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@252065 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-19 20:31:52 +00:00
brettw@chromium.org a561545dc2 GN build fixes, mostly for Mac.
This hooks up detection for the "-arch" flag on Mac to set the GYP "ARCH" xcode variable. GN then removes the -arch argument from the compiler args, since GYP will then re-add it based on the ARCH value. Previously, not doing this resulting in mutliple "-arch" arguments to the compiler since GYP would always insert its own.

Disables some warnings on Windows for the re2 target to match the GYP build. The third warning (4018) that the GYP build sets is disabled globally so there's no need to do it for this target.

Hooks up some iOS SDK stuff.
BUG=336667
TBR=thakis@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@247206 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-27 07:41:23 +00:00
thakis@chromium.org 0d8dd03970 Revert 246124 "gn: Fix clang plugin on ios."
This isn't correct for the iOS xcode builder.

> gn: Fix clang plugin on ios.
> 
> BUG=336491
> TBR=brettw@chromium.org
> 
> Review URL: https://codereview.chromium.org/144073003

TBR=thakis@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@246146 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-21 22:45:32 +00:00
thakis@chromium.org a6ffeb98aa gn: Fix clang plugin on ios.
BUG=336491
TBR=brettw@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@246124 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-21 21:42:20 +00:00
brettw@chromium.org b3af3ccb35 Hook up clang_use_chrome_plugins to the GN build.
Previously this was ignored in the GN build but disabling the plugin is used on some buildbots.

BUG=http://crbug.com/330298
R=thakis@chromium.org, thakis

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@245602 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-17 20:34:06 +00:00
brettw@chromium.org c1c131c7d8 Convert GN single-item list concat to use lists.
R=scottmg@chromium.org, scottmg

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@245594 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-17 20:19:45 +00:00
brettw@chromium.org 5888118620 Use proper clang plugin name in GN build.
This uses the proper name of the Clang plugin on Linux (previously it was hardcoded to the Mac-style name).

This also fixes the path naming so the clang plugin is correct no matter where the output directory is.

R=thakis@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@242573 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-12-26 23:11:19 +00:00
brettw@chromium.org c54085c7d3 Move files from the secondary GN directory to build.
Since this build is looking less experimental, I'm moving the files out of secondary into the corresponding location in src/build.

I added owners files that just include me. For now I'd like to review all changes here.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@236319 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-20 22:21:03 +00:00