def run(self, cfg, flags, args): if len(args) < 2: raise ArgError() input_file = args[0] interfaces = args[1:] output_file = target.flag(flags, "-o") rw_file = target.flag(flags, "--rw") return passes.specialize(input_file, output_file, rw_file, interfaces)
def run(self, cfg, flags, args): if len(args) < 1: raise ArgError() input_file = args[0] args = args[1:] output_file = target.flag(flags, '-o') name = target.flag(flags, '--name') return passes.specialize_program_args(input_file, output_file, args, name=name)
def run(self, cfg, flags, args): if len(args) < 1: raise ArgError() input_file = args[0] output_file = target.flag(flags, '-o') log_file = target.flag(flags, '--log') if log_file is not None: log_file = open(log_file, 'w+') return passes.peval(input_file, output_file, log=log_file)
def run(self, cfg, flags, args): output = target.flag(flags, '-o', None) if (output is None) or len(args) != 2: raise target.ArgError('o') archive_to_module(args[0], output, minimal=None) return 0
def run(self, cfg, flags, args): output = target.flag(flags, "-o", "-") if ("--join", "") in flags: if len(args) < 1: raise target.ArgError() ifs = [parse(x) for x in args] result = ifs[0] for x in ifs[1:]: interface.joinInterfaces(result, x) else: # This is computing the interface if len(args) < 1: raise target.ArgError() if args[0] == "@*": iface = None else: iface = parse(args[0]) libs = args[1:] if "--deep" in flags: result = deep(libs, iface) else: result = shallow(libs, iface) interface.writeInterface(result, output) return 0
def run(self, cfg, flags, args): if len(args) < 2: raise ArgError() input_file = args[0] rewrites = args[1:] output_file = target.flag(flags, '-o') passes.rewrite(input_file, output_file, rewrites) return 0
def run(self, cfg, flags, args): if len(args) < 2: raise target.ArgError() input_file = args[0] ifaces = args[1:] output_file = target.flag(flags, '-o') return driver.previrt(input_file, output_file, ['-Poccam'] + driver.all_args('-Poccam-input', ifaces))
def run(self, cfg, flags, args): if len(args) < 2: raise ArgError() input_file = args[0] interfaces = args[1:] output_file = target.flag(flags, '-o') if output_file is None: raise ArgError() return driver.previrt(input_file, output_file, ['-Pwatch2'] + driver.all_args('-Pwatch2-input', interfaces))
def run(self, cfg, flags, args): if len(args) == 0: raise target.ArgError() input_file = args[0] if len(args) == 1: ifaces = None else: ifaces = args[1:] output_file = target.flag(flags, '-o') return toolchain.archive_to_module(input_file, output_file, minimal=ifaces)
def run(self, cfg, flags, args): input_file = args[0] interfaces = args[1:] output_file = target.flag(flags, 'o') if output_file is None: raise ArgError() inF = ('--in', '') in flags outF = ('--out', '') in flags if inF and outF: raise ArgError() elif inF: tool = '-Penforce-inside' elif outF: tool = '-Penforce-outside' else: raise ArgError() return driver.previrt(input_file, output_file, [tool] + driver.all_args('%s-input' % tool, interfaces))