コード例 #1
0
ファイル: prepare_bindings.py プロジェクト: llvm-project/lldb
def main(args):
    """Drives the main script preparation steps.

    @param args list of command line arguments.
    """
    # Process command line arguments.
    options = process_args(args)
    logging.debug("Processed args: options=%s", options)

    # Ensure we have a swig executable.
    if not options.swig_executable or len(options.swig_executable) == 0:
        if options.find_swig:
            try:
                options.swig_executable = fs.find_executable("swig")
            except Exception as e:
                logging.error("Unable to find swig executable: %s" % e.message)
                sys.exit(-6)
        else:
            logging.error(
                "The --find-swig option must be specified "
                "when the swig executable location is not "
                "explicitly provided.")
            sys.exit(-12)

    # Check if the swig file exists.
    swig_path = os.path.normcase(
        os.path.join(options.src_root, "scripts", "lldb.swig"))
    if not os.path.isfile(swig_path):
        logging.error("swig file not found at '%s'", swig_path)
        sys.exit(-3)

    # Prepare bindings for each supported language binding.
    # This will error out if it doesn't succeed.
    prepare_all_bindings(options)
    sys.exit(0)
コード例 #2
0
def main(args):
    """Drives the main script preparation steps.

    @param args list of command line arguments.
    """
    # Process command line arguments.
    options = process_args(args)
    logging.debug("Processed args: options=%s", options)

    # Ensure we have a swig executable.
    if not options.swig_executable or len(options.swig_executable) == 0:
        if options.find_swig:
            try:
                options.swig_executable = fs.find_executable("swig")
            except Exception as e:
                logging.error("Unable to find swig executable: %s" % e.message)
                sys.exit(-6)
        else:
            logging.error("The --find-swig option must be specified "
                          "when the swig executable location is not "
                          "explicitly provided.")
            sys.exit(-12)

    # Check if the swig file exists.
    swig_path = os.path.normcase(
        os.path.join(options.src_root, "scripts", "lldb.swig"))
    if not os.path.isfile(swig_path):
        logging.error("swig file not found at '%s'", swig_path)
        sys.exit(-3)

    # Prepare bindings for each supported language binding.
    # This will error out if it doesn't succeed.
    prepare_all_bindings(options)
    sys.exit(0)
コード例 #3
0
ファイル: client.py プロジェクト: 32bitmicro/riscv-lldb
 def __call__(self, parser, namespace, values, option_string=None):
     swig_exe = None
     if values is None:
         swig_exe = fs.find_executable('swig')
     else:
         swig_exe = values
     setattr(namespace, self.dest, os.path.normpath(swig_exe))
コード例 #4
0
ファイル: client.py プロジェクト: ljh740/llvm-project
 def __call__(self, parser, namespace, values, option_string=None):
     swig_exe = None
     if values is None:
         swig_exe = fs.find_executable('swig')
     else:
         swig_exe = values
     setattr(namespace, self.dest, os.path.normpath(swig_exe))
コード例 #5
0
def add_subparser_args(parser):
    parser.add_argument("--port",
                        action="store",
                        default=default_port,
                        help=("The local port to bind to"))

    parser.add_argument("--swig-executable",
                        action="store",
                        default=fs.find_executable("swig"),
                        dest="swig_executable")
コード例 #6
0
ファイル: server.py プロジェクト: CodaFi/swift-lldb
def add_subparser_args(parser):
    parser.add_argument(
        "--port",
        action="store",
        default=default_port,
        help=("The local port to bind to"))

    parser.add_argument(
        "--swig-executable",
        action="store",
        default=fs.find_executable("swig"),
        dest="swig_executable")