[Lldb-commits] [lldb] r253575 - Revert "prepare_bindings.py: enable static bindings"

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 19 08:56:13 PST 2015


Author: tfiala
Date: Thu Nov 19 10:56:12 2015
New Revision: 253575

URL: http://llvm.org/viewvc/llvm-project?rev=253575&view=rev
Log:
Revert "prepare_bindings.py: enable static bindings"

This reverts commit 40f789f2dc6bb80fd25a33f91e452d081ed9d0ee.

Removed:
    lldb/trunk/scripts/Python/static-binding/LLDBWrapPython.cpp
    lldb/trunk/scripts/Python/static-binding/lldb.py
Modified:
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/scripts/Python/prepare_binding_Python.py
    lldb/trunk/scripts/prepare_bindings.py

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=253575&r1=253574&r2=253575&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 19 10:56:12 2015
@@ -6226,7 +6226,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/bash;
-			shellScript = "/usr/bin/python $SRCROOT/scripts/prepare_bindings.py --find-swig --framework --src-root $SRCROOT --target-dir $TARGET_BUILD_DIR --config-build-dir $CONFIGURATION_BUILD_DIR --allow-static-binding";
+			shellScript = "/usr/bin/python $SRCROOT/scripts/prepare_bindings.py --find-swig --framework --src-root $SRCROOT --target-dir $TARGET_BUILD_DIR --config-build-dir $CONFIGURATION_BUILD_DIR";
 		};
 		4959511A1A1ACE9500F6F8FC /* Install Clang compiler headers */ = {
 			isa = PBXShellScriptBuildPhase;

Modified: lldb/trunk/scripts/Python/prepare_binding_Python.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/prepare_binding_Python.py?rev=253575&r1=253574&r2=253575&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/prepare_binding_Python.py (original)
+++ lldb/trunk/scripts/Python/prepare_binding_Python.py Thu Nov 19 10:56:12 2015
@@ -251,42 +251,6 @@ def do_swig_rebuild(options, dependency_
             sys.exit(-10)
 
 
-def copy_static_bindings(options, config_build_dir, settings):
-    """Copies the static Python bindings over to the build dir.
-    """
-
-    # Copy the LLDBWrapPython.cpp C++ binding file impl over.
-    lldb_wrap_python_src_path = os.path.join(
-        options.src_root,
-        "scripts",
-        "Python",
-        options.static_binding_dir,
-        "LLDBWrapPython.cpp")
-    if not os.path.exists(lldb_wrap_python_src_path):
-        logging.error(
-            "failed to find static Python binding .cpp file at '%s'",
-            lldb_wrap_python_src_path)
-        sys.exit(-12)
-    shutil.copyfile(lldb_wrap_python_src_path, settings.output_file)
-
-    # Copy the lldb.py impl over.
-    lldb_py_src_path = os.path.join(
-        options.src_root,
-        "scripts",
-        "Python",
-        options.static_binding_dir,
-        "lldb.py")
-    if not os.path.exists(lldb_py_src_path):
-        logging.error(
-            "failed to find static Python binding .py file at '%s'",
-            lldb_py_src_path)
-        sys.exit(-13)
-    lldb_py_dest_path = os.path.join(
-        os.path.dirname(settings.output_file),
-        "lldb.py")
-    shutil.copyfile(lldb_py_src_path, lldb_py_dest_path)
-
-
 def run_python_script(script_and_args):
     """Runs a python script, logging appropriately.
 
@@ -454,21 +418,14 @@ def main(options):
             "Skipping Python binding generation: everything is up to date")
         return
 
-    # Generate the Python binding with swig, or use the static bindings if no swig.
-    if not options.swig_executable or not os.path.exists(options.swig_executable):
-        # Copy over the static bindings.  We capture the the modified (i.e. post-processed)
-        # binding, so we don't do the modify step here - the modifications have
-        # already been applied.
-        copy_static_bindings(options, config_build_dir, settings)
-    else:
-        # Generate the bindings with swig.
-        logging.info("Python binding is out of date, regenerating")
-        do_swig_rebuild(options, dependency_file, config_build_dir, settings)
-        if options.generate_dependency_file:
-            return
+    # Generate the Python binding with swig.
+    logging.info("Python binding is out of date, regenerating")
+    do_swig_rebuild(options, dependency_file, config_build_dir, settings)
+    if options.generate_dependency_file:
+        return
 
-        # Post process the swig-generated file.
-        do_modify_python_lldb(options, config_build_dir)
+    # Post process the swig-generated file.
+    do_modify_python_lldb(options, config_build_dir)
 
 
 # This script can be called by another Python script by calling the main()




More information about the lldb-commits mailing list