OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python2 | |
2 | |
3 import argparse | |
4 import os | |
5 | |
6 import szbuild | |
7 | |
8 from utils import FindBaseNaCl | |
9 | |
10 def main(): | |
11 """Build native gcc-style executables for one or all Spec2K components. | |
12 | |
13 Afterwards, the executables can be run from the | |
14 native_client/tests/spec2k/ directory as: | |
15 './run_all.sh RunBenchmarks SetupGccX8632Opt {train|ref} ...' | |
16 """ | |
17 nacl_root = FindBaseNaCl() | |
18 components = [ '164.gzip', '175.vpr', '176.gcc', '177.mesa', '179.art', | |
19 '181.mcf', '183.equake', '186.crafty', '188.ammp', | |
20 '197.parser', '252.eon', '253.perlbmk', '254.gap', | |
21 '255.vortex', '256.bzip2', '300.twolf' ] | |
22 | |
23 argparser = argparse.ArgumentParser(description=main.__doc__) | |
24 szbuild.AddOptionalArgs(argparser) | |
25 argparser.add_argument('comps', nargs='*', default=components) | |
26 args = argparser.parse_args() | |
27 for comp in args.comps: | |
28 if comp not in components: | |
29 print 'Ignoring unknown component ' + comp | |
jvoung (off chromium)
2014/09/17 15:29:09
If it's useful, could make this a strict error?
Jim Stichnoth
2014/09/17 16:18:21
Done. It now computes the complete set of unknown
| |
30 continue | |
31 name = os.path.splitext(comp)[1] or comp | |
32 if name[0] == '.': | |
33 name = name[1:] | |
34 szbuild.ProcessPexe(args, | |
35 ('{root}/tests/spec2k/{comp}/' + | |
36 '{name}.opt.stripped.pexe' | |
37 ).format(root=nacl_root, comp=comp, name=name), | |
38 ('{root}/tests/spec2k/{comp}/' + | |
39 '{name}.gcc.opt.x8632' | |
40 ).format(root=nacl_root, comp=comp, name=name)) | |
41 | |
42 if __name__ == '__main__': | |
43 main() | |
OLD | NEW |