undoing change per nates request
--HG-- extra : convert_revision : c5c2fd88dfd8d893da51c2b80907260ec14a7593
This commit is contained in:
parent
b1ab7b53c3
commit
f4e2f0ea33
13
SConscript
13
SConscript
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from os.path import isdir
|
|
||||||
|
|
||||||
# This file defines how to build a particular configuration of M5
|
# This file defines how to build a particular configuration of M5
|
||||||
# based on variable settings in the 'env' build environment.
|
# based on variable settings in the 'env' build environment.
|
||||||
|
@ -337,16 +336,18 @@ else:
|
||||||
|
|
||||||
extra_libraries = []
|
extra_libraries = []
|
||||||
env.Append(LIBS=['z'])
|
env.Append(LIBS=['z'])
|
||||||
if isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \
|
if env['USE_MYSQL']:
|
||||||
isdir('/usr/local/lib/mysql'):
|
|
||||||
env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/',
|
|
||||||
'/usr/lib/mysql'])
|
|
||||||
env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
|
|
||||||
sources += mysql_sources
|
sources += mysql_sources
|
||||||
env.Append(CPPDEFINES = 'USE_MYSQL')
|
env.Append(CPPDEFINES = 'USE_MYSQL')
|
||||||
env.Append(CPPDEFINES = 'STATS_BINNING')
|
env.Append(CPPDEFINES = 'STATS_BINNING')
|
||||||
|
env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
|
||||||
|
if os.path.isdir('/usr/lib64'):
|
||||||
|
env.Append(LIBPATH=['/usr/lib64/mysql'])
|
||||||
|
else:
|
||||||
|
env.Append(LIBPATH=['/usr/lib/mysql/'])
|
||||||
env.Append(LIBS=['mysqlclient'])
|
env.Append(LIBS=['mysqlclient'])
|
||||||
|
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
#
|
#
|
||||||
# Special build rules.
|
# Special build rules.
|
||||||
|
|
|
@ -101,12 +101,23 @@ configs_map = {
|
||||||
'KERNEL' : KernelConfig
|
'KERNEL' : KernelConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Enable detailed full-system binning.
|
||||||
|
def MeasureOpt(env):
|
||||||
|
env.Replace(USE_MYSQL = True)
|
||||||
|
env.Append(CPPDEFINES = 'FS_MEASURE')
|
||||||
|
|
||||||
|
# Enable MySql database output for stats.
|
||||||
|
def MySqlOpt(env):
|
||||||
|
env.Replace(USE_MYSQL = True)
|
||||||
|
|
||||||
# Disable FastAlloc object allocation.
|
# Disable FastAlloc object allocation.
|
||||||
def NoFastAllocOpt(env):
|
def NoFastAllocOpt(env):
|
||||||
env.Append(CPPDEFINES = 'NO_FAST_ALLOC')
|
env.Append(CPPDEFINES = 'NO_FAST_ALLOC')
|
||||||
|
|
||||||
# Configuration options map.
|
# Configuration options map.
|
||||||
options_map = {
|
options_map = {
|
||||||
|
'MEASURE' : MeasureOpt,
|
||||||
|
'MYSQL' : MySqlOpt,
|
||||||
'NO_FAST_ALLOC' : NoFastAllocOpt
|
'NO_FAST_ALLOC' : NoFastAllocOpt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
os.symlink(joinpath(jobdir, 'output'), 'status.out')
|
os.symlink(joinpath(jobdir, 'output'), 'status.out')
|
||||||
|
|
||||||
args = [ joinpath(basedir, 'm5'), '-d', '%s' % jobdir, joinpath(basedir, 'run.mpy') ]
|
args = [ joinpath(basedir, 'm5'), joinpath(basedir, 'run.mpy') ]
|
||||||
if not len(args):
|
if not len(args):
|
||||||
sys.exit("no arguments")
|
sys.exit("no arguments")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue