|
|
@ -36,19 +36,18 @@ def create_genrules(
|
|
|
|
name,
|
|
|
|
name,
|
|
|
|
srcs
|
|
|
|
srcs
|
|
|
|
):
|
|
|
|
):
|
|
|
|
if 'GENERATE_INFER_GENRULES' in os.environ and srcs:
|
|
|
|
for analyzer in analyzers:
|
|
|
|
for analyzer in analyzers:
|
|
|
|
analyzer_name = name + '_{}'.format(analyzer)
|
|
|
|
analyzer_name = name + '_{}'.format(analyzer)
|
|
|
|
genrule(
|
|
|
|
genrule(
|
|
|
|
name = analyzer_name,
|
|
|
|
name = analyzer_name,
|
|
|
|
srcs=srcs,
|
|
|
|
srcs=srcs,
|
|
|
|
cmd = ' '.join([
|
|
|
|
cmd = ' '.join([
|
|
|
|
|
|
|
|
os.getenv('INFER_BIN', 'infer'),
|
|
|
|
os.getenv('INFER_BIN', 'infer'),
|
|
|
|
'-a', analyzer,
|
|
|
|
'-a', analyzer,
|
|
|
|
'--results-dir', '$OUT',
|
|
|
|
'--results-dir', '$OUT',
|
|
|
|
'--classpath', '$(classpath :{})'.format(name),
|
|
|
|
'--classpath', '$(classpath :{})'.format(name),
|
|
|
|
'--sourcepath', '$SRCDIR',
|
|
|
|
'--sourcepath', '$SRCDIR',
|
|
|
|
'--generated-classes', '$(location :{})'.format(name),
|
|
|
|
'--generated-classes', '$(location :{})'.format(name),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
out = '{}_out'.format(analyzer),
|
|
|
|
out = '{}_out'.format(analyzer),
|
|
|
|
)
|
|
|
|
)
|
|
|
|