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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-05-13 16:08:34 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-05-13 16:08:34 +0400
commit8941cc626a8689385f5e135899a0e8a86c04ad99 (patch)
treebef4e4e76f801a62ca8a4c32722bd98614ec917f /build_files/scons/tools
parent91bddf2b13c61644d60ce909123068609769fbf0 (diff)
Option to use jemalloc when building with scons under linux.
Disabled by default.
Diffstat (limited to 'build_files/scons/tools')
-rw-r--r--build_files/scons/tools/Blender.py8
-rw-r--r--build_files/scons/tools/btools.py11
2 files changed, 18 insertions, 1 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index ad4df1a60c1..90c2c35bb98 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -203,6 +203,11 @@ def setup_staticlibs(lenv):
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
libincs.append('/usr/lib')
+ if lenv['WITH_BF_JEMALLOC']:
+ libincs += Split(lenv['BF_JEMALLOC_LIBPATH'])
+ if lenv['WITH_BF_STATICJEMALLOC']:
+ statlibs += Split(lenv['BF_JEMALLOC_LIB_STATIC'])
+
return statlibs, libincs
def setup_syslibs(lenv):
@@ -263,6 +268,9 @@ def setup_syslibs(lenv):
if not lenv['WITH_BF_STATICLIBSAMPLERATE']:
syslibs += Split(lenv['BF_LIBSAMPLERATE_LIB'])
+ if lenv['WITH_BF_JEMALLOC']:
+ if not lenv['WITH_BF_STATICJEMALLOC']:
+ syslibs += Split(lenv['BF_JEMALLOC_LIB'])
syslibs += lenv['LLIBS']
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index fcc782bd824..fda88d7d5a9 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -134,7 +134,8 @@ def validate_arguments(args, bc):
'WITH_BF_RAYOPTIMIZATION',
'BF_RAYOPTIMIZATION_SSE_FLAGS',
'BF_NO_ELBEEM',
- 'WITH_BF_CXX_GUARDEDALLOC'
+ 'WITH_BF_CXX_GUARDEDALLOC',
+ 'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC'
]
# Have options here that scons expects to be lists
@@ -429,6 +430,14 @@ def read_opts(env, cfg, args):
('BF_EXPAT_LIB', 'Expat library', ''),
('BF_EXPAT_LIBPATH', 'Expat library path', ''),
+ (BoolVariable('WITH_BF_JEMALLOC', 'Use jemalloc if true', False)),
+ (BoolVariable('WITH_BF_STATICJEMALLOC', 'Staticly link to jemalloc', False)),
+ ('BF_JEMALLOC', 'jemalloc base path', ''),
+ ('BF_JEMALLOC_INC', 'jemalloc include path', ''),
+ ('BF_JEMALLOC_LIB', 'jemalloc library', ''),
+ ('BF_JEMALLOC_LIBPATH', 'jemalloc library path', ''),
+ ('BF_JEMALLOC_LIB_STATIC', 'jemalloc static library', ''),
+
(BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
(BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),