aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-21 14:14:45 +0000
committerlloyd <[email protected]>2015-02-21 14:14:45 +0000
commit5ef7108d620a00ce5b2f6997c8b6ffc0708467d6 (patch)
tree670771c55dfb1e77e0783cd791355327ecdf1ef6 /configure.py
parentee2ac0c46d0c76e04b0fa68f9bb73825b60a4b09 (diff)
Hide all uses of boost filesystem in fs.cpp. Use readdir as an
alternate implementation for Unix and add some feature checks so a boost-free build of the tests and command line are possible again.
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/configure.py b/configure.py
index 0279361d8..aa863f639 100755
--- a/configure.py
+++ b/configure.py
@@ -259,6 +259,9 @@ def process_command_line(args):
dest='unaligned_mem', action='store_false',
help=optparse.SUPPRESS_HELP)
+ target_group.add_option('--with-os-features', action='append', help=optparse.SUPPRESS_HELP)
+ target_group.add_option('--without-os-features', action='append', help=optparse.SUPPRESS_HELP)
+
for isa_extn_name in ['SSE2', 'SSSE3', 'AVX2', 'AES-NI', 'AltiVec']:
isa_extn = isa_extn_name.lower()
@@ -459,6 +462,9 @@ def process_command_line(args):
options.enabled_modules = parse_multiple_enable(options.enabled_modules)
options.disabled_modules = parse_multiple_enable(options.disabled_modules)
+ options.with_os_features = parse_multiple_enable(options.with_os_features)
+ options.without_os_features = parse_multiple_enable(options.without_os_features)
+
options.disable_intrinsics = parse_multiple_enable(options.disable_intrinsics)
return options
@@ -948,10 +954,15 @@ class OsInfo(object):
def ranlib_command(self):
return ('ranlib' if self.ar_needs_ranlib else 'true')
- def defines(self):
- return ['TARGET_OS_IS_%s' % (self.basename.upper())] + \
- ['TARGET_OS_HAS_' + feat.upper()
- for feat in sorted(self.target_features)]
+ def defines(self, options):
+ r = []
+ for feat in self.target_features:
+ if feat not in options.without_os_features:
+ r += ['TARGET_OS_HAS_' + feat.upper()]
+ for feat in options.with_os_features:
+ if feat not in self.target_features:
+ r += ['TARGET_OS_HAS_' + feat.upper()]
+ return ['TARGET_OS_IS_%s' % (self.basename.upper())] + sorted(r)
def fixup_proc_name(proc):
proc = proc.lower().replace(' ', '')
@@ -1264,7 +1275,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo):
'module_defines': make_cpp_macros(sorted(flatten([m.defines() for m in modules]))),
- 'target_os_defines': make_cpp_macros(osinfo.defines()),
+ 'target_os_defines': make_cpp_macros(osinfo.defines(options)),
'target_compiler_defines': make_cpp_macros(cc.defines()),