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

Unified Diff: pnacl/driver/pnacl-meta.py

Issue 9264026: Add support for generating nmfs for pnacl pexes with glibc (vs pnacl nexes). (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: add search path args for psos Created 8 years, 11 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 | « SConstruct ('k') | pnacl/driver/pnacl-nmf.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl/driver/pnacl-meta.py
diff --git a/pnacl/driver/pnacl-meta.py b/pnacl/driver/pnacl-meta.py
index 19487ffb6877a9ddee3ea63155a68bd320414518..cc4b9c8700f6b88a6d2a7370d520f25680a2ba70 100755
--- a/pnacl/driver/pnacl-meta.py
+++ b/pnacl/driver/pnacl-meta.py
@@ -1,15 +1,15 @@
#!/usr/bin/python
-# Copyright (c) 2011 The Native Client Authors. All rights reserved.
+# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# IMPORTANT NOTE: If you make local mods to this file, you must run:
-# % tools/llvm/utman.sh driver
+# % pnacl/build.sh driver
# in order for them to take effect in the scons build. This command
# updates the copy in the toolchain/ tree.
#
-# Show the PNaCl metadata of a bitcode file
+# Show the PNaCl metadata of a bitcode file.
from driver_tools import *
from driver_env import env
@@ -28,9 +28,17 @@ def Usage():
print "Usage: pnacl-meta [files...]"
print "Show the PNaCl-specific metadata of a bitcode file"
+def OutputAll(input_file, metadata):
+ print pathtools.touser(input_file) + ":"
+ for k, v in metadata.iteritems():
+ if isinstance(v, list):
+ v = '[ ' + ', '.join(v) + ' ]'
+ print ' %-12s: %s' % (k, v)
+ else:
+ print ' %-12s: %s' % (k, v)
+
def main(argv):
ParseArgs(argv, META_PATTERNS)
-
inputs = env.get('INPUTS')
if not inputs:
@@ -41,11 +49,7 @@ def main(argv):
if not IsBitcode(f):
Log.Fatal("%s: File is not bitcode", pathtools.touser(f))
metadata = GetBitcodeMetadata(f)
- print pathtools.touser(f) + ":"
- for k, v in metadata.iteritems():
- if isinstance(v, list):
- v = "[ " + ', '.join(v) + " ]"
- print " %-12s: %s" % (k, v)
+ OutputAll(f, metadata)
return 0
« no previous file with comments | « SConstruct ('k') | pnacl/driver/pnacl-nmf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698