SConstruct (2733:e0eac8fc5774) | SConstruct (2761:55b821162cd2) |
---|---|
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 --- 25 unchanged lines hidden (view full) --- 34# 35# While in this directory ('m5'), just type 'scons' to build the default 36# configuration (see below), or type 'scons build/<CONFIG>/<binary>' 37# to build some other configuration (e.g., 'build/ALPHA_FS/m5.opt' for 38# the optimized full-system version). 39# 40# You can build M5 in a different directory as long as there is a 41# 'build/<CONFIG>' somewhere along the target path. The build system | 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 --- 25 unchanged lines hidden (view full) --- 34# 35# While in this directory ('m5'), just type 'scons' to build the default 36# configuration (see below), or type 'scons build/<CONFIG>/<binary>' 37# to build some other configuration (e.g., 'build/ALPHA_FS/m5.opt' for 38# the optimized full-system version). 39# 40# You can build M5 in a different directory as long as there is a 41# 'build/<CONFIG>' somewhere along the target path. The build system |
42# expdects that all configs under the same build directory are being | 42# expects that all configs under the same build directory are being |
43# built for the same host system. 44# 45# Examples: | 43# built for the same host system. 44# 45# Examples: |
46# These two commands are equivalent. The '-u' option tells scons to 47# search up the directory tree for this SConstruct file. | 46# 47# The following two commands are equivalent. The '-u' option tells 48# scons to search up the directory tree for this SConstruct file. |
48# % cd <path-to-src>/m5 ; scons build/ALPHA_FS/m5.debug 49# % cd <path-to-src>/m5/build/ALPHA_FS; scons -u m5.debug | 49# % cd <path-to-src>/m5 ; scons build/ALPHA_FS/m5.debug 50# % cd <path-to-src>/m5/build/ALPHA_FS; scons -u m5.debug |
50# These two commands are equivalent and demonstrate building in a 51# directory outside of the source tree. The '-C' option tells scons 52# to chdir to the specified directory to find this SConstruct file. | 51# 52# The following two commands are equivalent and demonstrate building 53# in a directory outside of the source tree. The '-C' option tells 54# scons to chdir to the specified directory to find this SConstruct 55# file. |
53# % cd <path-to-src>/m5 ; scons /local/foo/build/ALPHA_FS/m5.debug 54# % cd /local/foo/build/ALPHA_FS; scons -C <path-to-src>/m5 m5.debug 55# 56# You can use 'scons -H' to print scons options. If you're in this 57# 'm5' directory (or use -u or -C to tell scons where to find this 58# file), you can use 'scons -h' to print all the M5-specific build 59# options as well. 60# --- 236 unchanged lines hidden (view full) --- 297 ) 298 299# Non-sticky options only apply to the current build. 300nonsticky_opts = Options(args=ARGUMENTS) 301nonsticky_opts.AddOptions( 302 BoolOption('update_ref', 'Update test reference outputs', False) 303 ) 304 | 56# % cd <path-to-src>/m5 ; scons /local/foo/build/ALPHA_FS/m5.debug 57# % cd /local/foo/build/ALPHA_FS; scons -C <path-to-src>/m5 m5.debug 58# 59# You can use 'scons -H' to print scons options. If you're in this 60# 'm5' directory (or use -u or -C to tell scons where to find this 61# file), you can use 'scons -h' to print all the M5-specific build 62# options as well. 63# --- 236 unchanged lines hidden (view full) --- 300 ) 301 302# Non-sticky options only apply to the current build. 303nonsticky_opts = Options(args=ARGUMENTS) 304nonsticky_opts.AddOptions( 305 BoolOption('update_ref', 'Update test reference outputs', False) 306 ) 307 |
305# These options get exported to #defines in config/*.hh (see m5/SConscript). | 308# These options get exported to #defines in config/*.hh (see src/SConscript). |
306env.ExportOptions = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \ 307 'USE_MYSQL', 'NO_FAST_ALLOC', 'SS_COMPATIBLE_FP', \ 308 'USE_CHECKER'] 309 310# Define a handy 'no-op' action 311def no_action(target, source, env): 312 return 0 313 --- 169 unchanged lines hidden (view full) --- 483 # extra 'qdo' every time we run scons. 484 if env['BATCH']: 485 env['CC'] = env['BATCH_CMD'] + ' ' + env['CC'] 486 env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX'] 487 488 if env['USE_SSE2']: 489 env.Append(CCFLAGS='-msse2') 490 | 309env.ExportOptions = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \ 310 'USE_MYSQL', 'NO_FAST_ALLOC', 'SS_COMPATIBLE_FP', \ 311 'USE_CHECKER'] 312 313# Define a handy 'no-op' action 314def no_action(target, source, env): 315 return 0 316 --- 169 unchanged lines hidden (view full) --- 486 # extra 'qdo' every time we run scons. 487 if env['BATCH']: 488 env['CC'] = env['BATCH_CMD'] + ' ' + env['CC'] 489 env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX'] 490 491 if env['USE_SSE2']: 492 env.Append(CCFLAGS='-msse2') 493 |
491 # The m5/SConscript file sets up the build rules in 'env' according | 494 # The src/SConscript file sets up the build rules in 'env' according |
492 # to the configured options. It returns a list of environments, 493 # one for each variant build (debug, opt, etc.) 494 envList = SConscript('src/SConscript', build_dir = build_path, 495 exports = 'env') 496 497 # Set up the regression tests for each build. 498# for e in envList: 499# SConscript('m5-test/SConscript', --- 12 unchanged lines hidden --- | 495 # to the configured options. It returns a list of environments, 496 # one for each variant build (debug, opt, etc.) 497 envList = SConscript('src/SConscript', build_dir = build_path, 498 exports = 'env') 499 500 # Set up the regression tests for each build. 501# for e in envList: 502# SConscript('m5-test/SConscript', --- 12 unchanged lines hidden --- |