소스 검색

add tcmalloc lib

tanghai 15 년 전
부모
커밋
c9c57dbeab
2개의 변경된 파일12개의 추가작업 그리고 6개의 파일을 삭제
  1. 12 3
      SConstruct
  2. 0 3
      src/thread/SConscript

+ 12 - 3
SConstruct

@@ -8,17 +8,26 @@ def ParseOptions():
 		default='dbg',
 		help='build in dbg or opt mode')
 
+ParseOptions()
+
 env = DefaultEnvironment()
 
-ParseOptions()
 env['mode'] = GetOption('mode')
 
+env.Append(CPPPATH=Dir(env['mode']).abspath)
+
+env.Append(LIBS=[
+	'gflags',
+	'glog',
+	'gtest',
+])
+
 if env['mode'] == 'dbg':
 	env.Append(CCFLAGS='-g')
+	env.Append(LIBS='tcmalloc_debug')
 else:
 	env.Append(CCFLAGS='-O2 -g')
-
-env.Append(CPPPATH=Dir(env['mode']).abspath)
+	env.Append(LIBS='tcmalloc')
 
 Export('env')
 

+ 0 - 3
src/thread/SConscript

@@ -3,9 +3,6 @@ Import('env')
 thread_env = env.Clone()
 
 thread_env.Append(LIBS=[
-	'gflags',
-	'glog',
-	'gtest',
 	'boost_thread',
 ])