Add option to disable scanning for 32-bit bindings on 64-bit platforms
authorGustavo Carneiro <gjcarneiro@gmail.com>
Sun, 02 Mar 2014 12:24:39 +0000
changeset 10639 6600e199f788
parent 10638 aa85c4fcd5d7
child 10640 4275dcaa1337
Add option to disable scanning for 32-bit bindings on 64-bit platforms
bindings/python/wscript
--- a/bindings/python/wscript	Sun Mar 02 01:03:04 2014 -0800
+++ b/bindings/python/wscript	Sun Mar 02 12:24:39 2014 +0000
@@ -47,6 +47,10 @@
     opt.add_option('--with-python',
                    help=('Path to the Python interpreter to use.'),
                    default=None, dest='with_python', type="string")
+    opt.add_option('--no32bit-scan',
+                   help=("Don't scan for the 32-bit variant of the bindings on 64-bit platforms."),
+                   action="store_true", default=False,
+                   dest='no32bit_scan')
 
 
 def configure(conf):
@@ -436,7 +440,9 @@
         else:
             import struct
             if struct.calcsize('I') == 4 and struct.calcsize('L') == 8 and struct.calcsize('P') == 8:
-                scan_targets.extend([('gcc_ILP32', '-m32'), ('gcc_LP64', '-m64')])
+                if not Options.options.no32bit_scan:
+                    scan_targets.append(('gcc_ILP32', '-m32'))
+                scan_targets.append(('gcc_LP64', '-m64'))
             elif struct.calcsize('I') == 4 and struct.calcsize('L') == 4 and struct.calcsize('P') == 4:
                 scan_targets.append(('gcc_ILP32', ''))
             else: