blob: 729ecb1a9c3e95e9e60464bb024bbb66c0ead074 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/usr/bin/env python
from itertools import combinations
def powerset(items):
result = []
for i in xrange(len(items) + 1):
result += combinations(items, i)
return result
MAKE_J_VAL = 32
possible_compilers = [('gcc', 'g++'), ('clang', 'clang++')]
possible_compiler_opts = [
'-m32',
]
possible_config_opts = [
'--enable-debug',
'--enable-prof',
'--disable-stats',
'--disable-tcache',
]
print 'set -e'
print 'autoconf'
print 'unamestr=`uname`'
for cc, cxx in possible_compilers:
for compiler_opts in powerset(possible_compiler_opts):
for config_opts in powerset(possible_config_opts):
if cc is 'clang' \
and '-m32' in possible_compiler_opts \
and '--enable-prof' in config_opts:
continue
config_line = (
'./configure '
+ 'CC="{} {}" '.format(cc, " ".join(compiler_opts))
+ 'CXX="{} {}" '.format(cxx, " ".join(compiler_opts))
+ " ".join(config_opts)
)
# Heap profiling is not supported on OS X.
if '--enable-prof' in config_opts:
print 'if [[ "$unamestr" != "Darwin" ]]; then'
print config_line
print "make clean"
print "make -j" + str(MAKE_J_VAL) + " check"
if '--enable-prof' in config_opts:
print 'fi'
|