Enable CXX_GUARDEDALLOC support through SCons.
This commit is contained in:
parent
48d2aac250
commit
663ce490e0
|
@ -92,6 +92,7 @@ def validate_arguments(args, bc):
|
|||
'WITH_BF_RAYOPTIMIZATION',
|
||||
'BF_RAYOPTIMIZATION_SSE_FLAGS',
|
||||
'BF_NO_ELBEEM',
|
||||
'WITH_BF_CXX_GUARDEDALLOC',
|
||||
'BF_VCREDIST' # Windows-only, and useful only when creating installer
|
||||
]
|
||||
|
||||
|
@ -453,6 +454,7 @@ def read_opts(env, cfg, args):
|
|||
|
||||
(BoolVariable('WITH_BF_RAYOPTIMIZATION', 'Enable raytracer SSE/SIMD optimization.', False)),
|
||||
('BF_RAYOPTIMIZATION_SSE_FLAGS', 'SSE flags', ''),
|
||||
(BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)),
|
||||
('BF_VCREDIST', 'Full path to vcredist', '')
|
||||
) # end of opts.AddOptions()
|
||||
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
|
||||
Import('env')
|
||||
|
||||
sources = env.Glob('intern/*.c')
|
||||
defs = []
|
||||
|
||||
sources = ['intern/mallocn.c', 'intern/mmap_win.c']
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
sources.append('cpp/mallocn.cpp')
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
incs = '.'
|
||||
|
||||
env.BlenderLib ('bf_intern_guardedalloc', sources, Split(incs), defines=[], libtype=['intern','player'], priority = [5,150] )
|
||||
env.BlenderLib ('bf_intern_guardedalloc', sources, Split(incs), defs, libtype=['intern','player'], priority = [5,150] )
|
||||
|
|
|
@ -4,4 +4,10 @@ Import ('env')
|
|||
sources = env.Glob('intern/*.cpp')
|
||||
incs = '.'
|
||||
|
||||
env.BlenderLib ('bf_intern_string', sources, Split(incs), [], libtype=['intern','player'], priority = [50,10] )
|
||||
defs = []
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
incs += ' #intern/guardedalloc'
|
||||
|
||||
env.BlenderLib ('bf_intern_string', sources, Split(incs), defs, libtype=['intern','player'], priority = [50,10] )
|
||||
|
|
|
@ -30,6 +30,9 @@ if env['WITH_BF_PYTHON']:
|
|||
else:
|
||||
defs.append('DISABLE_PYTHON')
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
incs += ' ' + env['BF_BULLET_INC']
|
||||
incs += ' ' + env['BF_OPENGL_INC']
|
||||
|
||||
|
|
|
@ -32,4 +32,7 @@ if env['WITH_BF_PYTHON']:
|
|||
else:
|
||||
defs.append('DISABLE_PYTHON')
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,40], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -12,4 +12,7 @@ if env['WITH_BF_PYTHON']:
|
|||
else:
|
||||
defs.append('DISABLE_PYTHON')
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
env.BlenderLib ( 'bf_expressions', sources, Split(incs), defs, libtype=['core','player'], priority = [360,80], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -23,4 +23,8 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
|||
if env['BF_DEBUG']:
|
||||
defs.append('_DEBUG')
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
incs += ' #/intern/guardedalloc'
|
||||
|
||||
env.BlenderLib ( 'bf_logic', sources, Split(incs), defs, libtype=['core','player'], priority=[330,65], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -40,4 +40,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
|
|||
if env['BF_DEBUG']:
|
||||
defs.append('_DEBUG') # for Python
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
env.BlenderLib ( 'bf_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320,45], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -5,4 +5,10 @@ sources = env.Glob('*.cpp') #'NG_NetworkMessage.cpp NG_NetworkObject.cpp NG_Netw
|
|||
|
||||
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include'
|
||||
|
||||
env.BlenderLib ( 'bf_ngnetwork', sources, Split(incs), [], libtype=['core','player'], priority=[400,130] )
|
||||
defs = []
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
incs += ' #intern/guardedalloc'
|
||||
|
||||
env.BlenderLib ( 'bf_ngnetwork', sources, Split(incs), defs, libtype=['core','player'], priority=[400,130] )
|
||||
|
|
|
@ -27,4 +27,7 @@ if env['WITH_BF_PYTHON']:
|
|||
else:
|
||||
defs.append('DISABLE_PYTHON')
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), defs, libtype=['core','player'], priority=[350,50], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -5,4 +5,10 @@ sources = 'DummyPhysicsEnvironment.cpp'
|
|||
|
||||
incs = '. ../common'
|
||||
|
||||
env.BlenderLib ( 'bf_dummy', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,60] )
|
||||
defs = []
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
incs += ' #intern/guardedalloc'
|
||||
|
||||
env.BlenderLib ( 'bf_dummy', Split(sources), Split(incs), defs, libtype=['core','player'], priority=[350,60] )
|
||||
|
|
|
@ -5,4 +5,10 @@ sources = 'PHY_IMotionState.cpp PHY_IController.cpp PHY_IPhysicsController.cpp P
|
|||
|
||||
incs = '. ../Dummy #intern/moto/include'
|
||||
|
||||
env.BlenderLib ( 'bf_physics_common', Split(sources), Split(incs), [], libtype=['core','player'], priority=[360,55], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
defs = []
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
incs += ' #intern/guardedalloc'
|
||||
|
||||
env.BlenderLib ( 'bf_physics_common', Split(sources), Split(incs), defs, libtype=['core','player'], priority=[360,55], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -10,4 +10,7 @@ incs += ' #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
|
|||
incs += ' #source/blender/gameengine/Ketsji #source/gameengine/SceneGraph #source/blender/makesdna #source/blender/blenkernel'
|
||||
incs += ' #intern/guardedalloc #source/blender/blenlib'
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), defines = defs, libtype=['core','player'], priority=[350,75], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -13,4 +13,7 @@ if env['WITH_BF_PYTHON']:
|
|||
else:
|
||||
defs.append('DISABLE_PYTHON')
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
|
||||
env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), defs, libtype=['core','player'], priority=[350,70], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
|
@ -6,4 +6,10 @@ sources = env.Glob('*.cpp')
|
|||
|
||||
incs = '. #intern/moto/include'
|
||||
|
||||
env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), [], libtype=['core','player'], priority=[325,85], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
defs = []
|
||||
|
||||
if env['WITH_BF_CXX_GUARDEDALLOC']:
|
||||
defs.append('WITH_CXX_GUARDEDALLOC')
|
||||
incs += ' #intern/guardedalloc'
|
||||
|
||||
env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), defs, libtype=['core','player'], priority=[325,85], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
|
Loading…
Reference in New Issue