From 045bec386315ec4d562ba69e1be533bf188ab21a Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 5 Sep 2017 15:56:37 -0700 Subject: [PATCH] [infer][java] add the bootclasspath command line option to the genrule tests Summary: Without this option, the frontend would fail to retrieve the type definition for the classes in the standard library, e.g. java.lang.String. Those failures are currently swallowed but the plan is to fail hard whenever the translation needs the definition of a class and is unable to find it as this should generally caused by some intergation bug with the build system. Reviewed By: sblackshear Differential Revision: D5770061 fbshipit-source-id: 20bad8f --- DEFS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DEFS b/DEFS index 759818aad..71d9524d5 100644 --- a/DEFS +++ b/DEFS @@ -39,6 +39,7 @@ def create_genrules( if 'GENERATE_INFER_GENRULES' in os.environ and srcs: for analyzer in analyzers: analyzer_name = name + '_{}'.format(analyzer) + bootclasspath = os.path.join(os.environ['JAVA_HOME'], 'jre', 'lib', 'rt.jar') genrule( name = analyzer_name, srcs=srcs, @@ -47,6 +48,7 @@ def create_genrules( '-a', analyzer, '--results-dir', '$OUT', '--classpath', '$(classpath :{})'.format(name), + '--bootclasspath', bootclasspath, '--sourcepath', '$SRCDIR', '--generated-classes', '$(location :{})'.format(name), ]),