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

77 Коммитов

Автор SHA1 Сообщение Дата
brettw 44ae0b3aad Hook up chrome.exe manifest in the Windows GN build.
This generates a proper version manifest for chrome.exe and also for the version assembly.

This adds a new way to get the chrome version info programatically at GN time. Although this adds another exec_script call, it removes four such calls in remoting so there is a net speed increase.

BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#339833}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 983c0562bba1e4d93bb7ee489f56bcbd61fc55f9
2015-07-22 04:27:41 +00:00
gunsch d9ad4f1c59 Android test runner: support negative gtest filter syntax.
Using --gtest_filter=-AudioInputTest.* currently results in no tests being
run, instead of "all tests except for AudioInputTest".

R=skyostil@chromium.org,cjhopman@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#338396}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: db9824bb2ffd51cc023e19077749ffe777887223
2015-07-10 23:37:39 +00:00
agrieve 478e342ca0 Move Android version stamping from an exec_script -> build rule
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#338292}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5f3dec8ead48312eea0b4a27329c4faf231333c7
2015-07-10 15:19:05 +00:00
mnaganov 2997f0f83b Restore under flag historic behaviour of lastchange.py wrt. Git-SVN repos
Adds optional flag '--git-svn-go-deeper' to allow lastchange.py find
the last committed SVN revision in a Git-SVN repo.

This is to help access DevTools frontend on Android for Chromium developers
that have local changes to Blink.

BUG=468691

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

Cr-Original-Commit-Position: refs/heads/master@{#335156}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b73e2ea7a4e319eb2e6183090dfe6b9796d42c3b
2015-06-18 23:16:45 +00:00
agable 73bad27810 Break out after finding Cr-Commit-Position in lastchange
R=mmoss@chromium.org
BUG=478179

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

Cr-Original-Commit-Position: refs/heads/master@{#326097}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ead70ba1e0db6dfd9bdb722363b2cfbc41d1a7d6
2015-04-21 19:34:57 +00:00
scottmg 317bbea2be gn format // (the rest, except mojo)
Excluded mojo because I think that needs to happen on the other side.

At gn --version = 306668 for which roll is in CQ.

R=brettw@chromium.org
TBR=scherkus@chromium.org
BUG=348474

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

Cr-Original-Commit-Position: refs/heads/master@{#306708}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 34fb7e5919ed42dc800acf3961fe6a2bf9e7d6eb
2014-12-03 23:27:41 +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
feng 6748b8c503 [Android] Remove the workaround code of a platform bug.
From our UMA and operation feedbacks, we don't see such issue anymore.
(We notified the manufactor of the issue and likely they addressed it
in OTA). The cleanup restores native library name to libchrome.so
instead of libchrome.<VER>.so.

BUG=311644

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

Cr-Original-Commit-Position: refs/heads/master@{#305925}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d9201758ca9e6dc47e36026a4029dae5cc69e4c4
2014-11-27 00:29:05 +00:00
primiano f6dde24a34 Make lastchange.py faster using git cat-file.
lastchange.py is using git show -s to get the commit message of HEAD.
It turns out that on some older versions of git that is a rather
expensive operation. Under particular circumstances it can eventually
take several minutes (see crbug.com/431463 #27).
Anyways, git cat-file is x45 faster than the equivalent show command
for the sake of printing the commit message.
$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
$ time git show -s --format=%B HEAD > /dev/null
real    0m0.090s

$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
$ time git cat-file commit HEAD > /dev/null
real    0m0.002s

BUG=431463

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

Cr-Original-Commit-Position: refs/heads/master@{#304444}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5176f672c91c461a2f87f333e2b88ab407b2bc52
2014-11-17 18:39:23 +00:00
torne f3d2db6624 android_webview: use chrome version information.
Replace the hardcoded version number used for the WebView's user agent
with the real version number of the corresponding Chrome build. This
uses the version information from src/chrome/VERSION; there is a pending
bug to move this out of chrome/ (http://crbug.com/345538) which will not
be impeded by this change as the location of the version info is
obtained from build/util/version.gypi.

BUG=297522

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

Cr-Original-Commit-Position: refs/heads/master@{#302614}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e72c9f4cc8e2d5abdf9ae4506abf94d5eb7a91d6
2014-11-04 16:32:03 +00:00
brettw 26697bdbff Remove brettw from some owners files.
TBR=cpu

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

Cr-Original-Commit-Position: refs/heads/master@{#297923}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5a6926e12a19c554b7e4efb28f0adc4101a20365
2014-10-02 22:19:36 +00:00
agable 464e2cff74 Lengthen lastchange VERSION string to show full hash and commit position.
Now that the DMServer has been fixed to accept 'agent' strings longer than
64 characters (http://crbug.com/406948), we can re-lengthen the string
produced by lastchange.py to include both the full git hash and the
Cr-Commit-Position.

R=joaodasilva@chromium.org, scottmg@chromium.org
BUG=406783

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

Cr-Original-Commit-Position: refs/heads/master@{#292963}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 740c00432f11b2378fcb2cc72e09dd0c9a74e62f
2014-09-02 18:36:45 +00:00
Brett Wilson 9c0c8d3cbb GN build improvements
Add a "last_commit_position" script so we can use commit positions for GN builds rather than git hashes. Remove the old last_change target in build/util which is no longer used.

Fix ozone GN build.
Fix Windows GN build.

R=jamesr@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#291729}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 48c29f238165e02c0e6c56c406c4c0ad8fd0f1cc
2014-08-25 19:07:44 +00:00
agable 25e8a6c0de Further shorten the lastchange string.
Even the 40-character hash causes problems when the pieces of the string before
it push the length to >64 characters. Truncating it is a temporary fix until
we discuss ways to accept strings longer than 64 chars.

R=cmp@chromium.org, scottmg@chromium.org
NOTRY=True
BUG=406783

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

Cr-Original-Commit-Position: refs/heads/master@{#291626}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15a2a65986f6dec827cce5bc7d58601ed9b1eb2a
2014-08-24 18:43:13 +00:00
agable 723c40a25c Temporarily make lastchange use only the git hash.
This will fix the currently failing browser_tests
CloudPolicyTests, which fail because the lastchange
string is too long.

TBR=scottmg@chromium.org, tandrii@chromium.org
NOTRY=True
NOTREECHECKS=True
TEST=passed browser_tests on linux_chromium_rel trybot
BUG=406783

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

Cr-Original-Commit-Position: refs/heads/master@{#291571}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 993d8dde169387c432c706e5b7a559dcb622bcc9
2014-08-23 18:51:27 +00:00
agable@chromium.org 804b22bcf1 Get lastchange.py to work correctly on Git repositories.
This changes lastchange.py in two ways:
1) If the commit it finds is a Git hash, it outputs the whole hash, not just
   the first 7 characters.
2) It only looks at HEAD to see if there is a git-svn id. Previously, it used
   --grep=git-svn-id, which would find the most recent commit containing a
   git-svn id. This would be broken after the switch to git, as it would always
   find the last commit before the switch. Now, it only inspects the most recent
   commit, and falls through to pure-Git if that fails.

R=dilmah@chromium.org, stip@chromium.org
BUG=399113

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@291165 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-21 20:27:40 +00:00
brettw@chromium.org 28303e4e48 Rename source_prereqs to inputs in the GN build.
This variable changed name.

R=jamesr@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282076 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-09 17:29:31 +00:00
raphael.kubo.da.costa@intel.com a4d003eb7a version.py: Use argparse instead of getopt.
Rewrite the argument handling code using argparse. It allows us to get
rid of a lot of manual parsing as well as the whole help message.

In addition, it fixes a few other bugs present in the previous
implementation:

- Passing 3 or more arguments that are not values for parameters would
  cause an infinite loop.
- The "--template" option was not allowed (only its short form "-t"
  was).

R=mark@chromium.org, brettw@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@277450 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-16 15:41:40 +00:00
raphael.kubo.da.costa@intel.com 8c481aa2e5 version.py: Pass the right object to Usage in getopt exceptions.
Usage() expects a string, not a full GetoptError object.

TEST=build/util/version.py --file chrome/VERSION --blargh
R=brettw@chromium.org, mark@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@276315 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-11 09:13:21 +00:00
brettw@chromium.org 9a06fdddb7 GN build improvements, misc plus
Parameterize webrtc enabling.

Add use_seccomp_pbf flag

Add a webkit version target

Work on ui/base GN build, especially on Windows. This target is a mess (in GYP). This patch tries to make it make a bit more sense while fixing the errors I found.

Fix ui/gl target for non-Linux platform. A bunch of X11 stuff was not parameterized.

Add unscaled resources target

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@271724 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-20 19:20:40 +00:00
brettw@chromium.org f2677258aa Remove the hard_dep flag in GN.
This was not hooked up but I kept it being acceptsed until all uses can be deleted. This deletes the remaining uses from the tree.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@270779 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-15 19:38:00 +00:00
brettw@chromium.org 84171adb19 Fix line endings on build/util/BUILD.gn
TBR=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@270723 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-15 17:40:09 +00:00
brettw@chromium.org 8d03cb1c06 This renames all custom GN targets to actions in the GN build like the new version requires.
R=scottmg@chromium.org
TBR=scottmg

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@259610 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-26 17:04:14 +00:00
feng@chromium.org 35a6d219f5 [Android] Workaround of an android platform bug.
On some Android devices (e.g., Sony Xperia), package manager may
fail to extract native libraries when updating Chrome.

The change tries alleviate the situation by:
1) name libchrome with version number;
2) when failed to load library, try to extract native libraies
   and load them.

BUG=311644

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@258546 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-21 12:39:56 +00:00
mad@chromium.org d822f25af7 Moving version script and gypi file to build\util.
BUG=343792

OK, it's been almost a week now, with regular pings to OWNERs, so I guess it's OK to TBR... It's only Gyp/script changes anyway... Feel free to uncheck the CQ box if you disagree...

TBR=beng@chromium.org, darin@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@252481 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-21 03:14:02 +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 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
dominikg@chromium.org 1fdc0ea16e Telemetry: Don't use scientific notation for floats when printing results.
When parsing results for the dashboard we don't expect any letters (such as the
'e' in scientific notation) in the string of values. This CL makes sure we don't
use scientific notation for printing floats.

BUG=318093

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@234829 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-13 16:23:37 +00:00
brettw@chromium.org 5513562f9f Add a target in GN that generates a last_change.h file for the SVN revision.
This is GN-only so the GYP build currently sets this to 0.

This adds the root generated file directory to all targets, so you can do #include "foo/bar.h" and get a generated file "bar.h" generated in directory "foo". This basically matches the internal Google build, and I use it here.

BUG=
R=viettrungluu@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@233969 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-08 20:31:13 +00:00
rmcilroy@chromium.org b22428de60 Telemetry: Check in PrintPerfResult that the flattened list is also non-zero.
BUG=304335

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@227271 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-10-07 11:47:00 +00:00
bulach@chromium.org c1a6baa697 Perf scripts: improves PrintPerfResult documentation.
No functional changes, just add a bit more info about the parameters.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@226827 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-10-03 20:10:57 +00:00
bulach@chromium.org fab1add99a Android / Telemetry: final cleanup on perf_tests_helper.
This module has moved to build/util/lib/common.
Fix up remaining references and remove the old file.
Also, bring up a tiny change that went on the old module (units for histogram).

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@225532 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-26 19:19:22 +00:00
bulach@chromium.org 68fbba6e0a Android: splits cache_control and perf_control.
Second step towards deprecating "perf_tests_helper.py"
towards more meaningful modules.
Also move thermal_throttle.py into perf/ and some
other minor cleanup.

BUG=

Review URL: https://chromiumcodereview.appspot.com/23681011

git-svn-id: http://src.chromium.org/svn/trunk/src/build@223606 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-17 13:52:42 +00:00
rschoen@google.com ad594a9a0f Copy perf_tests_helper.py into build/util/lib
Sorry for the delay on this one. Based off advice in https://codereview.chromium.org/22754003. Just a simple copy of the file, and removing the (seemingly unnecessary?) import of android_commands.

Will remove dependencies on old one as part of above mentioned patch.

Review URL: https://chromiumcodereview.appspot.com/23578019

git-svn-id: http://src.chromium.org/svn/trunk/src/build@223190 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-14 00:53:33 +00:00
skyostil@chromium.org 31a36bca7c Android: support glob-style gtest filters with content browser tests
This patch makes it possible to use glob-style gtest filters with
the content browser tests. An example of such a filter is
WebGLConformanceTest.*, which should cause all the WebGL conformance
tests to be run.

Previously the gtest filter was passed directly to the test executable,
causing it to run all matching tests successively in the same process.
Normally this would be fine, but with content browsertests we must run
each test in a fresh process to avoid issues with double initialization.

The fix is to expand the filter to a flat list of tests in the test
dispatcher. After this, the tests are sharded and run in exactly the
same way as when no gtest filter is provided.

BUG=138226

Review URL: https://chromiumcodereview.appspot.com/14882007

git-svn-id: http://src.chromium.org/svn/trunk/src/build@204680 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-07 00:50:14 +00:00
mnaganov@chromium.org d5583b58c2 Generate and use LASTCHANGE for blink
The main reason for making this change is the fact that when pulling
Chromium and Blink code into Android, we have to make automatic changes
to the repository (for example, for generating *.mk files), and the Blink
commit we have as HEAD doesn't match any public commit in the main 
Blink repo. While via the LASTCHANGE file we could report a publicly 
visible revision.

Also, the way webkit_version.h header is generated now appears to be silly.
First, it doesn't leverage enough existing tools. Second, as it is noted in
webkit_user_agent.gypi, it is broken for incremental builds.

Review URL: https://chromiumcodereview.appspot.com/14973005

git-svn-id: http://src.chromium.org/svn/trunk/src/build@203387 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-31 10:53:39 +00:00
chrisha@chromium.org ffc93fa785 Allow lastchange.py to be used for arbitrary repositories.
BUG=


Review URL: https://chromiumcodereview.appspot.com/11266037

git-svn-id: http://src.chromium.org/svn/trunk/src/build@164172 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-25 20:59:36 +00:00
torne@chromium.org 1579ccd4ab The LASTCHANGE file is created and updated by gclient runhooks under
normal circumstances, so it makes more sense to treat it as if it were a
checked-in source file, not a generated file. The rule for its
generation was still getting run once on a clean build, because the
other targets that depended on it expected a gyp timestamp file to exist
for the target.

There's no need for any other targets to actually depend on lastchange
(and in fact several of the targets that make use of the file already
don't depend on the target); it should already exist, and if it doesn't
then the source checkout is probably broken (as the other steps in
runhooks are also mandatory). So, remove the rule entirely.

Review URL: https://chromiumcodereview.appspot.com/10388213

git-svn-id: http://src.chromium.org/svn/trunk/src/build@139765 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-05-31 09:25:47 +00:00
scottmg@google.com 640075b1ec Fix lastchange.py when running on native win32 python
When running as runhooks, it's not run via cygwin like it was when run in the build, and isn't able to find git. I believe the test that checked for both cygwin and win32 before was incorrect (but was always run via cygwin before so didn't matter).

Additionally, when runhooks runs it, it's from above src/, so the cwd isn't in the repo. So, pass in the directory of the script itself so that git can find its repo.

BUG=112264

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120089

Review URL: https://chromiumcodereview.appspot.com/9317037

git-svn-id: http://src.chromium.org/svn/trunk/src/build@120110 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-02-01 21:52:41 +00:00
scottmg@google.com 7bf951a2fb Fix lastchange.py when running on native win32 python
When running as runhooks, it's not run via cygwin like it was when run in the build, and isn't able to find git. I believe the test that checked for both cygwin and win32 before was incorrect (but was always run via cygwin before so didn't matter).

Additionally, when runhooks runs it, it's from above src/, so the cwd isn't in the repo. So, pass in the directory of the script itself so that git can find its repo.

BUG=112264

Review URL: https://chromiumcodereview.appspot.com/9317037

git-svn-id: http://src.chromium.org/svn/trunk/src/build@120089 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-02-01 20:05:19 +00:00
scottmg@google.com 18d81aa5a4 Instead of always running the LASTCHANGE extractor, run it with regular file dependencies.
During gclient runhooks, update LASTCHANGE so that it will be updated at least as often as runhooks is run (i.e. for every sync).

LASTCHANGE moved to build/util rather than SHARED_INTERMEDIATE_DIR because that directory isn't known to runhooks.

BUG=111731

Review URL: https://chromiumcodereview.appspot.com/9169105

git-svn-id: http://src.chromium.org/svn/trunk/src/build@119950 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-01-31 20:45:25 +00:00
evan@chromium.org 5402752b39 lastchange: don't check git state for whether the tree is dirty
We don't show whether the tree was dirty for SVN.

Because lastchange runs on every build, these commands impact every
build.  The call to "git checkout" makes git stat every file in the
repository (including ones unrelated to the build).

This change makes a Ninja build of Chrome 20% faster.  I've seen the
command take tens of seconds on a cold disk, and it likely has a
larger impact on Windows where the disk is slower.


Review URL: http://codereview.chromium.org/9148030

git-svn-id: http://src.chromium.org/svn/trunk/src/build@117352 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-01-12 01:46:33 +00:00
piman@chromium.org 1724c47105 Fix duplicate rule for LASTCHANGE
BUG=None
TEST=build it on linux (make/ninja), check no warning of duplicate rule


Review URL: http://codereview.chromium.org/7920025

git-svn-id: http://src.chromium.org/svn/trunk/src/build@101793 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-09-19 19:20:38 +00:00
pkasting@chromium.org 36e607a539 Fourth attempt at the following. Unreviewed, this was originally reviewed in http://codereview.chromium.org/7550002 .
Clean up SSL false start blacklist code. Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.

Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7903016

git-svn-id: http://src.chromium.org/svn/trunk/src/build@101378 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-09-15 21:17:32 +00:00
rsleevi@chromium.org 25ccdd45b5 Revert 98885 - Third attempt at the following. Unreviewed, this was originally reviewed in http://codereview.chromium.org/7550002 .
Clean up SSL false start blacklist code. Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.

Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7804001

TBR=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7778035

git-svn-id: http://src.chromium.org/svn/trunk/src/build@98917 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-08-31 02:35:19 +00:00
pkasting@chromium.org 3674287f67 Third attempt at the following. Unreviewed, this was originally reviewed in http://codereview.chromium.org/7550002 .
Clean up SSL false start blacklist code. Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.

Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7804001

git-svn-id: http://src.chromium.org/svn/trunk/src/build@98885 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-08-30 23:38:21 +00:00
mnissler@chromium.org afe0f1f3a2 Revert 95907 - Clean up SSL false start blacklist code. Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ .  Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
  * Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*.  This also allows doing string operations on them.
  * Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
  * Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
  * Avoid #define and "using".
  * Use standard algorithms for similar reasons as using string ops.
  * Use file_util functions to significantly abbreviate file reading/writing code.
  * Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
  * Avoid casting where possible.  Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
  * Convert non-error uses of stderr to the chrome-standard VLOG(1).
  * Correctly handle hostnames with trailing dots in the input file.
  * In general, shorten code where possible.

Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly.  It would be nice if we could avoid this but I guess gyp would have to be smarter or something.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002

TBR=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7623015

git-svn-id: http://src.chromium.org/svn/trunk/src/build@96391 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-08-11 14:53:53 +00:00
pkasting@chromium.org 66a2c6b4c7 Revert 95910 - Revert 95907 - Clean up SSL false start blacklist code.
Now that r96121 has landed, this should not cause compile failures when compiling base/ on the host.

Original comments follow.

Numerous changes, including:
  * Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ .  Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
  * Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*.  This also allows doing string operations on them.
  * Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
  * Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
  * Avoid #define and "using".
  * Use standard algorithms for similar reasons as using string ops.
  * Use file_util functions to significantly abbreviate file reading/writing code.
  * Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
  * Avoid casting where possible.  Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
  * Convert non-error uses of stderr to the chrome-standard VLOG(1).
  * Correctly handle hostnames with trailing dots in the input file.
  * In general, shorten code where possible.

Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly.  It would be nice if we could avoid this but I guess gyp would have to be smarter or something.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002

TBR=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7529035

TBR=fischman@chromium.org
Review URL: http://codereview.chromium.org/7587003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@96211 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-08-10 19:37:13 +00:00
fischman@chromium.org 25ac09bef8 Revert 95907 - Clean up SSL false start blacklist code. Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ .  Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
  * Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*.  This also allows doing string operations on them.
  * Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
  * Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
  * Avoid #define and "using".
  * Use standard algorithms for similar reasons as using string ops.
  * Use file_util functions to significantly abbreviate file reading/writing code.
  * Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
  * Avoid casting where possible.  Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
  * Convert non-error uses of stderr to the chrome-standard VLOG(1).
  * Correctly handle hostnames with trailing dots in the input file.
  * In general, shorten code where possible.

Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly.  It would be nice if we could avoid this but I guess gyp would have to be smarter or something.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002

TBR=pkasting@chromium.org
Review URL: http://codereview.chromium.org/7529035

git-svn-id: http://src.chromium.org/svn/trunk/src/build@95910 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-08-08 23:44:55 +00:00
pkasting@chromium.org 99442ed8df Clean up SSL false start blacklist code. Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ .  Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
  * Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*.  This also allows doing string operations on them.
  * Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
  * Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
  * Avoid #define and "using".
  * Use standard algorithms for similar reasons as using string ops.
  * Use file_util functions to significantly abbreviate file reading/writing code.
  * Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
  * Avoid casting where possible.  Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
  * Convert non-error uses of stderr to the chrome-standard VLOG(1).
  * Correctly handle hostnames with trailing dots in the input file.
  * In general, shorten code where possible.

Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly.  It would be nice if we could avoid this but I guess gyp would have to be smarter or something.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7550002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@95907 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2011-08-08 23:30:24 +00:00