Lines Matching refs:opts

447 def run(opts):  argument
461 command = opts.pop('command')
464 opts.update(classify_parameters(command))
466 return arch_check(opts)
474 def report_failure(opts): argument
485 return mapping.get(opts['language'], '.i')
490 failures_dir = os.path.join(opts['output_dir'], 'failures')
498 error = 'crash' if opts['exit_code'] < 0 else 'other_error'
506 cwd = opts['directory']
507 cmd = [opts['clang'], '-fsyntax-only', '-E'] + opts['flags'] + \
508 [opts['file'], '-o', name]
518 handle.write(opts['file'] + os.linesep)
522 handle.write(get_version(opts['clang']))
526 handle.writelines(opts['error_output'])
532 def run_analyzer(opts, continuation=report_failure): argument
539 if opts['output_format'] in {
545 dir=opts['output_dir'])
548 elif opts['output_format'] in {
553 dir=opts['output_dir'])
556 return opts['output_dir']
559 cwd = opts['directory']
560 cmd = get_arguments([opts['clang'], '--analyze'] +
561 opts['direct_args'] + opts['flags'] +
562 [opts['file'], '-o', target()],
568 if opts.get('output_failures', False):
569 opts.update(result)
570 continuation(opts)
574 if opts.get('output_failures', False):
575 opts.update(result)
576 continuation(opts)
597 def ctu_collect_phase(opts): argument
603 args = opts['direct_args'] + opts['flags']
604 ast_joined_path = os.path.join(opts['ctu'].dir, triple_arch, 'ast',
605 os.path.realpath(opts['file'])[1:] +
615 ast_command = [opts['clang'], '-emit-ast']
618 ast_command.append(opts['file'])
622 run_command(ast_command, cwd=opts['directory'])
627 args = opts['direct_args'] + opts['flags']
628 extdefmap_command = [opts['ctu'].extdef_map_cmd]
629 extdefmap_command.append(opts['file'])
634 extdef_src_list = run_command(extdefmap_command, cwd=opts['directory'])
636 extern_defs_map_folder = os.path.join(opts['ctu'].dir, triple_arch,
650 cwd = opts['directory']
651 cmd = [opts['clang'], '--analyze'] + opts['direct_args'] + opts['flags'] \
652 + [opts['file']]
659 def dispatch_ctu(opts, continuation=run_analyzer): argument
662 ctu_config = opts['ctu']
667 return ctu_collect_phase(opts)
669 cwd = opts['directory']
670 cmd = [opts['clang'], '--analyze'] + opts['direct_args'] \
671 + opts['flags'] + [opts['file']]
677 opts['direct_args'].extend(direct_options)
679 return continuation(opts)
683 def filter_debug_flags(opts, continuation=dispatch_ctu): argument
686 if opts.pop('force_debug'):
688 opts.update({'flags': opts['flags'] + ['-UNDEBUG']})
690 return continuation(opts)
694 def language_check(opts, continuation=filter_debug_flags): argument
704 language = opts.pop('language')
705 compiler = opts.pop('compiler')
708 language = classify_source(opts['file'], compiler == 'c')
718 opts.update({'language': language,
719 'flags': ['-x', language] + opts['flags']})
720 return continuation(opts)
724 def arch_check(opts, continuation=language_check): argument
729 received_list = opts.pop('arch_list')
741 opts.update({'flags': ['-arch', current] + opts['flags']})
742 return continuation(opts)
748 return continuation(opts)