summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/prepare_bindings.py
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2015-11-19 16:56:12 +0000
committerTodd Fiala <todd.fiala@gmail.com>2015-11-19 16:56:12 +0000
commitf6508db485936dd22bc0661d1f3eaf26e352c56d (patch)
tree9780107a5a8a668c96f73200881ca5e7c29d9af3 /lldb/scripts/prepare_bindings.py
parentae3680cbcdd4dea39b027dae897996781b562ff8 (diff)
downloadbcm5719-llvm-f6508db485936dd22bc0661d1f3eaf26e352c56d.tar.gz
bcm5719-llvm-f6508db485936dd22bc0661d1f3eaf26e352c56d.zip
Revert "prepare_bindings.py: enable static bindings"
This reverts commit 40f789f2dc6bb80fd25a33f91e452d081ed9d0ee. llvm-svn: 253575
Diffstat (limited to 'lldb/scripts/prepare_bindings.py')
-rwxr-xr-xlldb/scripts/prepare_bindings.py51
1 files changed, 12 insertions, 39 deletions
diff --git a/lldb/scripts/prepare_bindings.py b/lldb/scripts/prepare_bindings.py
index e9142348245..287f2007e7f 100755
--- a/lldb/scripts/prepare_bindings.py
+++ b/lldb/scripts/prepare_bindings.py
@@ -158,19 +158,6 @@ def process_args(args):
"Specifies the build dir where the language binding "
"should be placed"))
- group = parser.add_argument_group("static binding usage")
- group.add_argument(
- "--allow-static-binding",
- action="store_true",
- help=(
- "Specify the pre-baked binding can be used if "
- "swig cannot be found."))
- group.add_argument(
- "--static-binding-dir",
- default="static-binding",
- help="script-relative directory for appropriate static bindings"
- )
-
# Process args.
options = parser.parse_args(args)
@@ -209,14 +196,9 @@ def find_file_in_paths(paths, exe_basename):
return None
-def find_swig_executable(options, must_exist):
+def find_swig_executable(options):
"""Finds the swig executable in the PATH or known good locations.
- :param options the command line options returned by argparse.
-
- :param must_exist if True, this method exits the program if
- swig is not found; otherwise, always returns whether swig is found.
-
Replaces options.swig_executable with the full swig executable path.
"""
# Figure out what we're looking for.
@@ -237,28 +219,20 @@ def find_swig_executable(options, must_exist):
# Add in the extra dirs
paths_to_check.extend(extra_dirs)
if len(paths_to_check) < 1:
- if must_exist:
- logging.error(
- "swig executable was not specified, PATH has no "
- "contents, and there are no extra directories to search")
- sys.exit(-6)
- else:
- logging.info("failed to find swig: no paths available")
- return
+ logging.error(
+ "swig executable was not specified, PATH has no "
+ "contents, and there are no extra directories to search")
+ sys.exit(-6)
# Find the swig executable
options.swig_executable = find_file_in_paths(paths_to_check, exe_basename)
if not options.swig_executable or len(options.swig_executable) < 1:
- if must_exist:
- logging.error(
- "failed to find exe='%s' in paths='%s'",
- exe_basename,
- paths_to_check)
- sys.exit(-6)
- else:
- logging.info("%s not found in paths %s", exe_basename, paths_to_check)
- else:
- logging.info("found swig executable: %s", options.swig_executable)
+ logging.error(
+ "failed to find exe='%s' in paths='%s'",
+ exe_basename,
+ paths_to_check)
+ sys.exit(-6)
+ logging.info("found swig executable: %s", options.swig_executable)
def main(args):
@@ -273,8 +247,7 @@ def main(args):
# Ensure we have a swig executable.
if not options.swig_executable or len(options.swig_executable) == 0:
if options.find_swig:
- must_exist = not options.allow_static_binding
- find_swig_executable(options, must_exist)
+ find_swig_executable(options)
else:
logging.error(
"The --find-swig option must be specified "
OpenPOWER on IntegriCloud