Another scons fix/hack for OSX.

wx-config keeps returning -arch i386, breaking 64-bit builds. 
Thats the only place where a tuple occurs, filtering out non-strings should be fine for now until we find a better way to do this.
This commit only affects Mac OSX.
utils.py is reverted on purpose. if anything like this happens again, it will most likely fail and indicate more work.
Thanks to tmator and knatsch who tested the patch on r4843

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4851 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st 2010-01-16 12:22:53 +00:00
parent f3b52ea23d
commit 93bb45aaf2
2 changed files with 14 additions and 2 deletions

View file

@ -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"

View file

@ -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')
)