fix mashup of CCFLAGS and CXXFLAGS for scons builds.
CXXFLAGS defaults to CCFLAGS which was causing duplicated or extra compile flags being set for g++. Fix is to use env.Replace() rather than .Append() the first time we set CXXFLAGS in the build environment.
This commit is contained in:
parent
26735a6670
commit
4e66d4e676
@ -387,12 +387,18 @@ class BlenderEnvironment(SConsEnvironment):
|
|||||||
lenv.Append(CPPDEFINES=defines)
|
lenv.Append(CPPDEFINES=defines)
|
||||||
if lenv['WITH_BF_GAMEENGINE']:
|
if lenv['WITH_BF_GAMEENGINE']:
|
||||||
lenv.Append(CPPDEFINES=['GAMEBLENDER=1'])
|
lenv.Append(CPPDEFINES=['GAMEBLENDER=1'])
|
||||||
|
# debug or not
|
||||||
|
# CXXFLAGS defaults to CCFLAGS, therefore
|
||||||
|
# we Replace() rather than Append() to CXXFLAGS the first time
|
||||||
if lenv['BF_DEBUG'] or (libname in quickdebug):
|
if lenv['BF_DEBUG'] or (libname in quickdebug):
|
||||||
lenv.Append(CCFLAGS = Split(lenv['BF_DEBUG_FLAGS']), CXXFLAGS = Split(lenv['BF_DEBUG_FLAGS']))
|
lenv.Append(CCFLAGS = Split(lenv['BF_DEBUG_FLAGS']))
|
||||||
|
lenv.Replace( CXXFLAGS = Split(lenv['BF_DEBUG_FLAGS']))
|
||||||
else:
|
else:
|
||||||
lenv.Append(CCFLAGS = lenv['REL_CFLAGS'], CXXFLAGS = lenv['REL_CCFLAGS'])
|
lenv.Append(CCFLAGS = lenv['REL_CFLAGS'])
|
||||||
|
lenv.Replace(CXXFLAGS = lenv['REL_CCFLAGS'])
|
||||||
if lenv['BF_PROFILE']:
|
if lenv['BF_PROFILE']:
|
||||||
lenv.Append(CCFLAGS = Split(lenv['BF_PROFILE_FLAGS']), CXXFLAGS = Split(lenv['BF_PROFILE_FLAGS']))
|
lenv.Append(CCFLAGS = Split(lenv['BF_PROFILE_FLAGS']),
|
||||||
|
CXXFLAGS = Split(lenv['BF_PROFILE_FLAGS']))
|
||||||
if compileflags:
|
if compileflags:
|
||||||
lenv.Append(CCFLAGS = compileflags)
|
lenv.Append(CCFLAGS = compileflags)
|
||||||
lenv.Append(CXXFLAGS = compileflags)
|
lenv.Append(CXXFLAGS = compileflags)
|
||||||
|
Loading…
Reference in New Issue
Block a user