Commit 79db348c44953af4ead015d902ecffba4f8cdcf0
1 parent
f7f9c443
Variable allowing to change strip tool
Showing
1 changed file
with
12 additions
and
6 deletions
Show diff stats
anubis_dev/vm/SConstruct
| ... | ... | @@ -12,16 +12,18 @@ opts.Add('CCFLAGS', 'The C & C++ compiler flags') |
| 12 | 12 | opts.Add('LINK', 'The linker') |
| 13 | 13 | opts.Add('LINKFLAGS', 'The linker flags') |
| 14 | 14 | opts.Add('LIBPATH', 'The linker includes paths') |
| 15 | -opts.Add('STRIP', 'The platform dependant strip tool', 'strip') | |
| 15 | +opts.Add(BoolOption('STRIP', 'The platform dependant strip tool', 1)) | |
| 16 | +opts.Add('STRIPTOOL', 'The platform dependant strip tool', 'strip') | |
| 16 | 17 | |
| 17 | 18 | def ArgToList(val): |
| 18 | 19 | return val.split() |
| 19 | 20 | |
| 20 | 21 | opts.Add('LIBS', 'Additionnal libs', '', None, ArgToList) |
| 21 | 22 | |
| 22 | -debug = ARGUMENTS.get('DEBUG', 0) | |
| 23 | -gui = ARGUMENTS.get('GUI', 1) | |
| 24 | -stripTool = ARGUMENTS.get('STRIP', 'strip') | |
| 23 | +debug = int(ARGUMENTS.get('DEBUG', 0)) | |
| 24 | +gui = int(ARGUMENTS.get('GUI', 1)) | |
| 25 | +strip = int(ARGUMENTS.get('STRIP', 1)) | |
| 26 | +stripTool = ARGUMENTS.get('STRIPTOOL', 'strip') | |
| 25 | 27 | env = Environment(options = opts, ENV = os.environ) |
| 26 | 28 | |
| 27 | 29 | if debug: |
| ... | ... | @@ -36,7 +38,10 @@ if env['PLATFORM'] == 'posix': |
| 36 | 38 | env.Append(CPPDEFINES = {'_LINUX_': None}) |
| 37 | 39 | env.Append(CCFLAGS = ' -O2 -c -Wall') |
| 38 | 40 | sqliteFlags = ' -O2 -c' |
| 39 | - vm_output_name = 'anbexec_with_symbols' | |
| 41 | + if strip != 0: | |
| 42 | + vm_output_name = 'anbexec_with_symbols' | |
| 43 | + else: | |
| 44 | + vm_output_name = 'anbexec' | |
| 40 | 45 | elif env['PLATFORM'] == 'win32': |
| 41 | 46 | host = 'win32' |
| 42 | 47 | sqliteFlags = ' -O2 -c' |
| ... | ... | @@ -121,7 +126,8 @@ if gui == 1: |
| 121 | 126 | all_anbexec_objs += graph_obj |
| 122 | 127 | anbexec = env.Program(vm_output_name, all_anbexec_objs) |
| 123 | 128 | |
| 124 | -if env['PLATFORM'] == 'posix': | |
| 129 | +if env['PLATFORM'] == 'posix' and strip != 0: | |
| 130 | + print 'STRIP = ', strip, type(strip) | |
| 125 | 131 | anbexec = env.Command('anbexec', vm_output_name, '%s -o $TARGET $SOURCE' % stripTool) |
| 126 | 132 | |
| 127 | 133 | if env['PLATFORM'] == 'posix': | ... | ... |