summaryrefslogtreecommitdiffstats
path: root/scripts/gen-lockedsig-cache
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen-lockedsig-cache')
-rwxr-xr-xscripts/gen-lockedsig-cache16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 26e9b63a30..de8a20c787 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -15,15 +15,27 @@ def mkdir(d):
15 15
16if len(sys.argv) < 5: 16if len(sys.argv) < 5:
17 print("Incorrect number of arguments specified") 17 print("Incorrect number of arguments specified")
18 print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> <nativelsbstring>") 18 print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> <nativelsbstring> [filterfile]")
19 sys.exit(1) 19 sys.exit(1)
20 20
21filterlist = []
22if len(sys.argv) > 5:
23 print('Reading filter file %s' % sys.argv[5])
24 with open(sys.argv[5]) as f:
25 for l in f.readlines():
26 if ":" in l:
27 filterlist.append(l.rstrip())
28
21print('Reading %s' % sys.argv[1]) 29print('Reading %s' % sys.argv[1])
22sigs = [] 30sigs = []
23with open(sys.argv[1]) as f: 31with open(sys.argv[1]) as f:
24 for l in f.readlines(): 32 for l in f.readlines():
25 if ":" in l: 33 if ":" in l:
26 sigs.append(l.split(":")[2].split()[0]) 34 task, sig = l.split()[0].rsplit(':', 1)
35 if filterlist and not task in filterlist:
36 print('Filtering out %s' % task)
37 else:
38 sigs.append(sig)
27 39
28print('Gathering file list') 40print('Gathering file list')
29files = set() 41files = set()