-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpprof-ar.py
More file actions
executable file
·33 lines (23 loc) · 929 Bytes
/
pprof-ar.py
File metadata and controls
executable file
·33 lines (23 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python2.7
import argparse
import pprof
def parseArguments():
description = 'pprof-ar is a simple replacement for ar.'
parser = argparse.ArgumentParser(description=description)
parser.add_argument('-prg', action='store_true',
help='Show the compilation progress')
parser.add_argument('-commands', help='print command lines executed',
action='store_true')
parser.add_argument('flags')
parser.add_argument('outFile')
parser.add_argument('-o', dest='output',
help='the name of the output file')
parser.add_argument('files', nargs='*')
arguments, argv = parser.parse_known_args()
return arguments
def main():
args = parseArguments()
commandLine = ['ar', args.flags, args.outFile] + args.files
pprof.log_exec(args, commandLine, 'Invoke native AR')
if __name__ == '__main__':
main()