Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unit tests currently use environment variables to change behavior. Using gflags this can be done via command line. BUG=libyuv:507 TBR=fbarchard@chromium.org Review URL: https://codereview.chromium.org/1413723002 .
- Loading branch information
Henrik Kjellander
committed
Oct 16, 2015
1 parent
f80cc26
commit 8dcec01
Showing
14 changed files
with
2,005 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,42 @@ | ||
vars = { | ||
# Override root_dir in your .gclient's custom_vars to specify a custom root | ||
# folder name. | ||
"root_dir": "libyuv", | ||
"extra_gyp_flag": "-Dextra_gyp_flag=0", | ||
'root_dir': 'libyuv', | ||
'extra_gyp_flag': '-Dextra_gyp_flag=0', | ||
'chromium_git': 'https://chromium.googlesource.com', | ||
|
||
# Roll the Chromium Git hash to pick up newer versions of all the | ||
# dependencies and tools linked to in setup_links.py. | ||
'chromium_revision': 'bb79186c63ff4eff7a2a318a21731005c53f269b', | ||
} | ||
|
||
# NOTE: Prefer revision numbers to tags for svn deps. Use http rather than | ||
# https; the latter can cause problems for users behind proxies. | ||
deps = { | ||
'src/third_party/gflags/src': | ||
Var('chromium_git') + '/external/gflags/src@e7390f9185c75f8d902c05ed7d20bb94eb914d0c', # from svn revision 82 | ||
} | ||
|
||
# Define rules for which include paths are allowed in our source. | ||
include_rules = [ '+gflags' ] | ||
|
||
hooks = [ | ||
{ | ||
# Clone chromium and its deps. | ||
"name": "sync chromium", | ||
"pattern": ".", | ||
"action": ["python", "-u", Var("root_dir") + "/sync_chromium.py", | ||
"--target-revision", Var("chromium_revision")], | ||
'name': 'sync chromium', | ||
'pattern': '.', | ||
'action': ['python', '-u', Var('root_dir') + '/sync_chromium.py', | ||
'--target-revision', Var('chromium_revision')], | ||
}, | ||
{ | ||
# Create links to shared dependencies in Chromium. | ||
"name": "setup_links", | ||
"pattern": ".", | ||
"action": ["python", Var("root_dir") + "/setup_links.py"], | ||
'name': 'setup_links', | ||
'pattern': '.', | ||
'action': ['python', Var('root_dir') + '/setup_links.py'], | ||
}, | ||
{ | ||
# A change to a .gyp, .gypi, or to GYP itself should run the generator. | ||
"pattern": ".", | ||
"action": ["python", Var("root_dir") + "/gyp_libyuv"], | ||
'pattern': '.', | ||
'action': ['python', Var('root_dir') + '/gyp_libyuv'], | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# | ||
# Copyright 2014 The LibYuv Project Authors. All rights reserved. | ||
# | ||
# Use of this source code is governed by a BSD-style license | ||
# that can be found in the LICENSE file in the root of the source | ||
# tree. An additional intellectual property rights grant can be found | ||
# in the file PATENTS. All contributing project authors may | ||
# be found in the AUTHORS file in the root of the source tree. | ||
|
||
# This is a copy of WebRTC's BUILD.gn. | ||
|
||
if (is_win) { | ||
gflags_gen_arch_root = "gen/win" | ||
} else { | ||
gflags_gen_arch_root = "gen/posix" | ||
} | ||
|
||
config("gflags_config") { | ||
include_dirs = [ | ||
"$gflags_gen_arch_root/include", # For configured files. | ||
"src", # For everything else. | ||
] | ||
|
||
defines = [ | ||
# These macros exist so flags and symbols are properly exported when | ||
# building DLLs. Since we don't build DLLs, we need to disable them. | ||
"GFLAGS_DLL_DECL=", | ||
"GFLAGS_DLL_DECLARE_FLAG=", | ||
"GFLAGS_DLL_DEFINE_FLAG=", | ||
] | ||
} | ||
|
||
source_set("gflags") { | ||
sources = [ | ||
"src/gflags.cc", | ||
"src/gflags_completions.cc", | ||
"src/gflags_reporting.cc", | ||
] | ||
if (is_win) { | ||
sources += [ "src/windows/port.cc" ] | ||
|
||
cflags = [ | ||
"/wd4005", # WIN32_LEAN_AND_MEAN. | ||
"/wd4267", # Conversion from size_t to "type". | ||
] | ||
} | ||
|
||
include_dirs = [ | ||
"$gflags_gen_arch_root/include/private", # For config.h | ||
] | ||
|
||
public_configs = [ ":gflags_config" ] | ||
|
||
configs -= [ "//build/config/compiler:chromium_code" ] | ||
configs += [ "//build/config/compiler:no_chromium_code" ] | ||
|
||
if (is_clang) { | ||
# TODO(andrew): Look into fixing this warning upstream: | ||
# http://code.google.com/p/webrtc/issues/detail?id=760 | ||
configs -= [ "//build/config/clang:extra_warnings" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Copyright (c) 2006, Google Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following disclaimer | ||
in the documentation and/or other materials provided with the | ||
distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
URL: http://code.google.com/p/gflags/ | ||
Version: 2.0 | ||
License: New BSD | ||
License File: LICENSE | ||
|
||
Description: | ||
The gflags package contains a library that implements commandline | ||
flags processing. As such it's a replacement for getopt(). It has | ||
increased flexibility, including built-in support for C++ types like | ||
string, and the ability to define flags in the source file in which | ||
they're used. | ||
|
||
Local Modifications: None | ||
|
||
|
||
How to update platform configuration files: | ||
The gen/ directory contains pre-generated configuration header files. | ||
Historically, all operating systems and architectures have generated | ||
similar configurations except for Windows. This is why there's only | ||
posix and win directories below gen/. | ||
When rolling gflags to a newer version, it's a good idea to check if | ||
new configuration files needs to be generated as well. | ||
Do this by running ./configure in the newly checked out version of | ||
gflags. Then diff the generated files with the ones below gen/. | ||
If you notice a diff, update the files with the updated ones. | ||
If you suspect platform dependend changes other than Windows, you'll | ||
have to checkout gflags on the other platforms as well and run | ||
./configure there too. |
Oops, something went wrong.