SConscript (2654:9559cfa91b9d) | SConscript (2655:da93a2088efa) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 32 unchanged lines hidden (view full) --- 41# Define needed sources. 42# 43################################################### 44 45# Base sources used by all configurations. 46 47base_sources = Split(''' 48 base/circlebuf.cc | 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 32 unchanged lines hidden (view full) --- 41# Define needed sources. 42# 43################################################### 44 45# Base sources used by all configurations. 46 47base_sources = Split(''' 48 base/circlebuf.cc |
49 base/copyright.cc | |
50 base/cprintf.cc | 49 base/cprintf.cc |
51 base/embedfile.cc | |
52 base/fast_alloc.cc 53 base/fifo_buffer.cc 54 base/hostinfo.cc 55 base/hybrid_pred.cc 56 base/inifile.cc 57 base/intmath.cc 58 base/match.cc 59 base/misc.cc --- 16 unchanged lines hidden (view full) --- 76 base/loader/elf_object.cc 77 base/loader/object_file.cc 78 base/loader/symtab.cc 79 base/stats/events.cc 80 base/stats/statdb.cc 81 base/stats/visit.cc 82 base/stats/text.cc 83 | 50 base/fast_alloc.cc 51 base/fifo_buffer.cc 52 base/hostinfo.cc 53 base/hybrid_pred.cc 54 base/inifile.cc 55 base/intmath.cc 56 base/match.cc 57 base/misc.cc --- 16 unchanged lines hidden (view full) --- 74 base/loader/elf_object.cc 75 base/loader/object_file.cc 76 base/loader/symtab.cc 77 base/stats/events.cc 78 base/stats/statdb.cc 79 base/stats/visit.cc 80 base/stats/text.cc 81 |
84 cpu/activity.cc | |
85 cpu/base.cc 86 cpu/cpu_exec_context.cc 87 cpu/cpuevent.cc 88 cpu/exetrace.cc 89 cpu/op_class.cc 90 cpu/pc_event.cc | 82 cpu/base.cc 83 cpu/cpu_exec_context.cc 84 cpu/cpuevent.cc 85 cpu/exetrace.cc 86 cpu/op_class.cc 87 cpu/pc_event.cc |
91 cpu/quiesce_event.cc | |
92 cpu/static_inst.cc 93 cpu/sampler/sampler.cc 94 95 mem/bridge.cc 96 mem/bus.cc 97 mem/connector.cc 98 mem/mem_object.cc 99 mem/packet.cc 100 mem/physical.cc 101 mem/port.cc 102 mem/request.cc 103 | 88 cpu/static_inst.cc 89 cpu/sampler/sampler.cc 90 91 mem/bridge.cc 92 mem/bus.cc 93 mem/connector.cc 94 mem/mem_object.cc 95 mem/packet.cc 96 mem/physical.cc 97 mem/port.cc 98 mem/request.cc 99 |
104 python/pyconfig.cc 105 python/embedded_py.cc 106 | |
107 sim/builder.cc 108 sim/configfile.cc 109 sim/debug.cc 110 sim/eventq.cc 111 sim/faults.cc 112 sim/main.cc 113 sim/param.cc 114 sim/profile.cc --- 238 unchanged lines hidden (view full) --- 353################################################### 354 355# Include file paths are rooted in this directory. SCons will 356# automatically expand '.' to refer to both the source directory and 357# the corresponding build directory to pick up generated include 358# files. 359env.Append(CPPPATH='.') 360 | 100 sim/builder.cc 101 sim/configfile.cc 102 sim/debug.cc 103 sim/eventq.cc 104 sim/faults.cc 105 sim/main.cc 106 sim/param.cc 107 sim/profile.cc --- 238 unchanged lines hidden (view full) --- 346################################################### 347 348# Include file paths are rooted in this directory. SCons will 349# automatically expand '.' to refer to both the source directory and 350# the corresponding build directory to pick up generated include 351# files. 352env.Append(CPPPATH='.') 353 |
354# List of constructed environments to pass back to SConstruct 355envList = [] 356 357# Function to create a new build environment as clone of current 358# environment 'env' with modified object suffix and optional stripped 359# binary. Additional keyword arguments are appended to corresponding 360# build environment vars. 361def makeEnv(label, objsfx, strip = False, **kwargs): 362 newEnv = env.Copy(OBJSUFFIX=objsfx) 363 newEnv.Label = label 364 newEnv.Append(**kwargs) 365 exe = 'm5.' + label # final executable 366 bin = exe + '.bin' # executable w/o appended Python zip archive 367 newEnv.Program(bin, make_objs(sources, newEnv)) 368 if strip: 369 stripped_bin = bin + '.stripped' 370 newEnv.Command(stripped_bin, bin, 'strip $SOURCE -o $TARGET') 371 bin = stripped_bin 372 targets = newEnv.Concat(exe, [bin, 'python/m5py.zip']) 373 newEnv.M5Binary = targets[0] 374 envList.append(newEnv) 375 |
|
361# Debug binary | 376# Debug binary |
362debugEnv = env.Copy(OBJSUFFIX='.do') 363debugEnv.Label = 'debug' 364debugEnv.Append(CCFLAGS=Split('-g3 -gdwarf-2 -O0')) 365debugEnv.Append(CPPDEFINES='DEBUG') 366tlist = debugEnv.Program(target = 'm5.debug', 367 source = make_objs(sources, debugEnv)) 368debugEnv.M5Binary = tlist[0] | 377makeEnv('debug', '.do', 378 CCFLAGS = Split('-g3 -gdwarf-2 -O0'), 379 CPPDEFINES = 'DEBUG') |
369 370# Optimized binary | 380 381# Optimized binary |
371optEnv = env.Copy() 372optEnv.Label = 'opt' 373optEnv.Append(CCFLAGS=Split('-g -O3')) 374tlist = optEnv.Program(target = 'm5.opt', 375 source = make_objs(sources, optEnv)) 376optEnv.M5Binary = tlist[0] | 382makeEnv('opt', '.o', 383 CCFLAGS = Split('-g -O3')) |
377 378# "Fast" binary | 384 385# "Fast" binary |
379fastEnv = env.Copy(OBJSUFFIX='.fo') 380fastEnv.Label = 'fast' 381fastEnv.Append(CCFLAGS=Split('-O3')) 382fastEnv.Append(CPPDEFINES='NDEBUG') 383fastEnv.Program(target = 'm5.fast.unstripped', 384 source = make_objs(sources, fastEnv)) 385tlist = fastEnv.Command(target = 'm5.fast', 386 source = 'm5.fast.unstripped', 387 action = 'strip $SOURCE -o $TARGET') 388fastEnv.M5Binary = tlist[0] | 386makeEnv('fast', '.fo', strip = True, 387 CCFLAGS = Split('-O3'), 388 CPPDEFINES = 'NDEBUG') |
389 390# Profiled binary | 389 390# Profiled binary |
391profEnv = env.Copy(OBJSUFFIX='.po') 392profEnv.Label = 'prof' 393profEnv.Append(CCFLAGS=Split('-O3 -g -pg'), LINKFLAGS='-pg') 394tlist = profEnv.Program(target = 'm5.prof', 395 source = make_objs(sources, profEnv)) 396profEnv.M5Binary = tlist[0] | 391makeEnv('prof', '.po', 392 CCFLAGS = Split('-O3 -g -pg'), 393 LINKFLAGS = '-pg') |
397 | 394 |
398envList = [debugEnv, optEnv, fastEnv, profEnv] 399 | |
400Return('envList') | 395Return('envList') |