From cb559e29471bc7c4e3be4184108efd79127b73a5 Mon Sep 17 00:00:00 2001 From: Gustavo Carneiro Date: Sun, 2 Mar 2014 12:24:39 +0000 Subject: [PATCH] Add option to disable scanning for 32-bit bindings on 64-bit platforms --- bindings/python/wscript | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bindings/python/wscript b/bindings/python/wscript index 3e09f17bd..88f534f85 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -47,6 +47,10 @@ def options(opt): 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 @@ def build(bld): 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: