Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_files/scons/tools/btools.py2
-rw-r--r--intern/guardedalloc/SConscript11
-rw-r--r--intern/string/SConscript8
-rw-r--r--source/gameengine/BlenderRoutines/SConscript3
-rw-r--r--source/gameengine/Converter/SConscript3
-rw-r--r--source/gameengine/Expressions/SConscript3
-rw-r--r--source/gameengine/GameLogic/SConscript4
-rw-r--r--source/gameengine/Ketsji/SConscript3
-rw-r--r--source/gameengine/Network/SConscript8
-rw-r--r--source/gameengine/Physics/Bullet/SConscript3
-rw-r--r--source/gameengine/Physics/Dummy/SConscript8
-rw-r--r--source/gameengine/Physics/common/SConscript8
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript3
-rw-r--r--source/gameengine/Rasterizer/SConscript3
-rw-r--r--source/gameengine/SceneGraph/SConscript8
15 files changed, 71 insertions, 7 deletions
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index 37d9048d70d..737ce40d702 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -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()
diff --git a/intern/guardedalloc/SConscript b/intern/guardedalloc/SConscript
index 0c9c7d13608..74d6e07269f 100644
--- a/intern/guardedalloc/SConscript
+++ b/intern/guardedalloc/SConscript
@@ -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] )
diff --git a/intern/string/SConscript b/intern/string/SConscript
index f8342bf12c2..dac0ead8e61 100644
--- a/intern/string/SConscript
+++ b/intern/string/SConscript
@@ -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] )
diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript
index f53fc509c6d..1a774fc8aba 100644
--- a/source/gameengine/BlenderRoutines/SConscript
+++ b/source/gameengine/BlenderRoutines/SConscript
@@ -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']
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index ab1d7574d89..7701d27730b 100644
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -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'])
diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript
index 007d6373c77..85db689a9ba 100644
--- a/source/gameengine/Expressions/SConscript
+++ b/source/gameengine/Expressions/SConscript
@@ -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'])
diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript
index 507bb7f0bdd..c9d1fed875d 100644
--- a/source/gameengine/GameLogic/SConscript
+++ b/source/gameengine/GameLogic/SConscript
@@ -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'])
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index 8d54452be0d..49e4528594f 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -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'])
diff --git a/source/gameengine/Network/SConscript b/source/gameengine/Network/SConscript
index 3883dc71c9c..3cf1747d013 100644
--- a/source/gameengine/Network/SConscript
+++ b/source/gameengine/Network/SConscript
@@ -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] )
diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript
index f58085ab354..6beb044671c 100644
--- a/source/gameengine/Physics/Bullet/SConscript
+++ b/source/gameengine/Physics/Bullet/SConscript
@@ -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'])
diff --git a/source/gameengine/Physics/Dummy/SConscript b/source/gameengine/Physics/Dummy/SConscript
index dc76e8046a0..496092133c3 100644
--- a/source/gameengine/Physics/Dummy/SConscript
+++ b/source/gameengine/Physics/Dummy/SConscript
@@ -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] )
diff --git a/source/gameengine/Physics/common/SConscript b/source/gameengine/Physics/common/SConscript
index 719c028ee8f..38bb7a11309 100644
--- a/source/gameengine/Physics/common/SConscript
+++ b/source/gameengine/Physics/common/SConscript
@@ -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'])
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
index 68e6789c05e..8ad6a8b28a2 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
@@ -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'])
diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript
index a78a0289d98..dc189c54a40 100644
--- a/source/gameengine/Rasterizer/SConscript
+++ b/source/gameengine/Rasterizer/SConscript
@@ -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'])
diff --git a/source/gameengine/SceneGraph/SConscript b/source/gameengine/SceneGraph/SConscript
index 2a33cd67b5e..992a10befa2 100644
--- a/source/gameengine/SceneGraph/SConscript
+++ b/source/gameengine/SceneGraph/SConscript
@@ -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'])