diff --git a/SConstruct b/SConstruct index 228faa4d84..9bc0db6d54 100644 --- a/SConstruct +++ b/SConstruct @@ -364,6 +364,19 @@ conf.Finish() #wx windows flags if env['HAVE_WX']: wxconfig.ParseWXConfig(env) + #this smells like a hack, but i dont know any other way to fix this + #right now. ParseWXConfig calls wx-config --libs, which returns + #"-arch i386" on my box (and probably also tmator's). + #SCons.ParseConfig makes this a tuple, which is + # 1) a problem for utils.filterWarnings + # 2) a duplicate (and conflicting) set of arch specifiers + #this mainly affects MacOSX, since darwin builds explicitly get + #those set around line 280. + if sys.platform == 'darwin': + env['CCFLAGS'] = [ + f + for f in filter(lambda x:isinstance(x, basestring), env['CCFLAGS']) + ] else: print "WX not found or disabled, not building GUI" diff --git a/SconsTests/utils.py b/SconsTests/utils.py index 74a4037109..9b0ce04930 100644 --- a/SconsTests/utils.py +++ b/SconsTests/utils.py @@ -5,8 +5,7 @@ import platform def filterWarnings(self, flags): return ' '.join( flag - # flags might contain tuples, like ('-arch','i386') - for flag in map(lambda x:(x,'='.join(x))[isinstance(x,tuple)],flags) + for flag in flags if not flag.startswith('-W') )