Index: pnacl/driver/pnacl-abicheck.py |
diff --git a/pnacl/driver/pnacl-abicheck.py b/pnacl/driver/pnacl-abicheck.py |
index 5121452a4231cf66cac77f60f71652cb02415b2e..30011f29361a2f277b7fab4d61d775d6ff45aa67 100644 |
--- a/pnacl/driver/pnacl-abicheck.py |
+++ b/pnacl/driver/pnacl-abicheck.py |
@@ -9,8 +9,9 @@ |
# updates the copy in the toolchain/ tree. |
# |
-import driver_env |
+from driver_env import env |
import driver_tools |
+import pathtools |
EXTRA_ENV = { |
'ARGS' : '', |
@@ -21,9 +22,13 @@ PATTERNS = [ |
] |
def main(argv): |
- driver_env.env.update(EXTRA_ENV) |
+ env.update(EXTRA_ENV) |
driver_tools.ParseArgs(argv, PATTERNS) |
+ args = env.get('ARGS') |
+ input = pathtools.normalize(args[-1]) |
jvoung (off chromium)
2013/07/10 00:18:29
Maybe do a sanity check the len of the args array
|
+ if driver_tools.IsPNaClBitcode(input): |
+ env.append('ARGS', '--bitcode-format=pnacl') |
driver_tools.Run('"${PNACL_ABICHECK}" ${ARGS}') |
return 0; |