Lines Matching refs:args
63 def __init__(self, args, android_build_top, test_dir): argument
65 self.bootclasspath = args.bootclasspath.absolute()
68 self.mode = args.mode
80 self.d8_path = args.d8.absolute()
81 self.d8 = functools.partial(self.run, args.d8.absolute())
82 self.jasmin = functools.partial(self.run, args.jasmin.absolute())
84 self.smali_path = args.smali.absolute()
85 self.rbe_rewrapper = args.rewrapper.absolute()
86 self.smali = functools.partial(self.run, args.smali.absolute())
87 self.soong_zip = functools.partial(self.run, args.soong_zip.absolute())
88 self.zipalign = functools.partial(self.run, args.zipalign.absolute())
89 if args.hiddenapi:
90 self.hiddenapi = functools.partial(self.run, args.hiddenapi.absolute())
100 self.d8 = functools.partial(self.rbe_d8, args.d8.absolute())
102 self.smali = functools.partial(self.rbe_smali, args.smali.absolute())
107 "D8": args.d8.absolute(),
114 "SMALI": args.smali.absolute(),
115 "SOONG_ZIP": args.soong_zip.absolute(),
126 def run(self, executable: pathlib.Path, args: List[Union[pathlib.Path, str]]):
134 cmd += args
166 def rbe_wrap(self, args, inputs: Set[pathlib.Path]=None): argument
171 for i, arg in enumerate(args):
184 ] + dbg_args + args)
186 def rbe_javac(self, javac_path:Path, args): argument
187 output = relpath(Path(args[args.index("-d") + 1]), self.rbe_exec_root)
188 return self.rbe_wrap(["--output_directories", output, javac_path] + args)
190 def rbe_d8(self, d8_path:Path, args): argument
192 output = relpath(Path(args[args.index("--output") + 1]), self.rbe_exec_root)
196 d8_path] + args, inputs)
198 def rbe_smali(self, smali_path:Path, args): argument
201 api = args[args.index("--api") + 1]
202 output = Path(args[args.index("--output") + 1])
228 "/bin/bash", wrapper] + args, inputs)
323 args = self.javac_args.split(" ") + javac_args
324 args += ["-implicit:none", "-encoding", "utf8", "-d", dst_dir]
325 args += ["-source", javac_source_arg, "-target", javac_target_arg]
327 args += ["-bootclasspath", self.bootclasspath]
329 args += ["-classpath", javac_classpath]
331 args += sorted(src_dir.glob("**/*.java"))
332 self.javac(args)
343 args = []
345 args += ["-JDcom.android.tools.r8.dexContainerExperiment"]
346 args += d8_flags + ["--min-api", str(api_level), "--output", dst_jar]
347 args += ["--lib", self.bootclasspath] if use_desugar else ["--no-desugaring"]
348 args += sorted(src_dir.glob("**/*.class"))
349 self.d8(args)
384 args: List[Union[str, Path]] = ["encode"]
386 args.extend(["--input-dex=" + str(dex_file), "--output-dex=" + str(dex_file)])
387 args.append("--api-flags=hiddenapi-flags.csv")
388 args.append("--no-force-assign-all")
389 self.hiddenapi(args)
548 args = parser.parse_args()
551 ziproot = args.out.absolute().parent / "zip"
552 test_dir_regex = re.compile(args.test_dir_regex) if args.test_dir_regex else re.compile(".*")
555 for s in args.srcs
562 return (args.hiddenapi != None) == ("hiddenapi" in srcdir.name)
568 dstdir = ziproot / args.mode / srcdir.name
570 tests.append(BuildTestContext(args, android_build_top, dstdir))
577 with ThreadPoolExecutor(cpu_count() if use_multiprocessing(args.mode) else 1) as pool:
588 proc = run([android_build_top / args.soong_zip, "-o", android_build_top / args.out,