Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: native_client_sdk/src/build_tools/build_projects.py

Issue 275523003: [NaCl SDK] Make build_projects quiet by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: flushing Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/buildbot_common.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/build_projects.py
diff --git a/native_client_sdk/src/build_tools/build_projects.py b/native_client_sdk/src/build_tools/build_projects.py
index ab3752cbedb43db58e6d921c7b052d82aeca7142..fc8ad5910e3ba713b1c9934d8cb155a3a71ec8c9 100755
--- a/native_client_sdk/src/build_tools/build_projects.py
+++ b/native_client_sdk/src/build_tools/build_projects.py
@@ -40,11 +40,16 @@ VALID_TOOLCHAINS = [
]
# Global verbosity setting.
-# If set to try (normally via a command line arg) then build_projects will
+# If set to True (normally via a command line arg) then build_projects will
# add V=1 to all calls to 'make'
verbose = False
+def Trace(msg):
+ if verbose:
+ sys.stderr.write(str(msg) + '\n')
+
+
def CopyFilesFromTo(filelist, srcdir, dstdir):
for filename in filelist:
srcpath = os.path.join(srcdir, filename)
@@ -229,7 +234,6 @@ def BuildProjectsBranch(pepperdir, branch, deps, clean, config, args=None):
def BuildProjects(pepperdir, project_tree, deps=True,
clean=False, config='Debug'):
-
# Make sure we build libraries (which live in 'src') before
# any of the examples.
build_first = [p for p in project_tree if p != 'src']
@@ -245,7 +249,8 @@ def main(argv):
help='Clobber project directories before copying new files',
action='store_true', default=False)
parser.add_option('-b', '--build',
- help='Build the projects.', action='store_true')
+ help='Build the projects. Otherwise the projects are only copied.',
+ action='store_true')
parser.add_option('--config',
help='Choose configuration to build (Debug or Release). Builds both '
'by default')
@@ -272,6 +277,12 @@ def main(argv):
options, args = parser.parse_args(argv[1:])
+ global verbose
+ if options.verbose:
+ verbose = True
+
+ buildbot_common.verbose = verbose
+
if 'NACL_SDK_ROOT' in os.environ:
# We don't want the currently configured NACL_SDK_ROOT to have any effect
# on the build.
@@ -292,37 +303,35 @@ def main(argv):
if 'host' in options.toolchain:
options.toolchain.remove('host')
options.toolchain.append(getos.GetPlatform())
- print 'Adding platform: ' + getos.GetPlatform()
+ Trace('Adding platform: ' + getos.GetPlatform())
ValidateToolchains(options.toolchain)
filters = {}
if options.toolchain:
filters['TOOLS'] = options.toolchain
- print 'Filter by toolchain: ' + str(options.toolchain)
+ Trace('Filter by toolchain: ' + str(options.toolchain))
if not options.experimental:
filters['EXPERIMENTAL'] = False
if options.dest:
filters['DEST'] = options.dest
- print 'Filter by type: ' + str(options.dest)
+ Trace('Filter by type: ' + str(options.dest))
if args:
filters['NAME'] = args
- print 'Filter by name: ' + str(args)
+ Trace('Filter by name: ' + str(args))
try:
project_tree = parse_dsc.LoadProjectTree(SDK_SRC_DIR, include=filters)
except parse_dsc.ValidationError as e:
buildbot_common.ErrorExit(str(e))
- parse_dsc.PrintProjectTree(project_tree)
+
+ if verbose:
+ parse_dsc.PrintProjectTree(project_tree)
UpdateHelpers(pepperdir, clobber=options.clobber)
UpdateProjects(pepperdir, project_tree, options.toolchain,
clobber=options.clobber)
- if options.verbose:
- global verbose
- verbose = True
-
if options.build:
if options.config:
configs = [options.config]
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/buildbot_common.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698