SConstruct (2761:55b821162cd2) SConstruct (2766:0844a9607f77)
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# expects that all configs under the same build directory are being
42# expdects 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#
47# The following two commands are equivalent. The '-u' option tells
48# scons to search up the directory tree for this SConstruct file.
46# These two commands are equivalent. The '-u' option tells scons to
47# search up the directory tree for this SConstruct file.
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
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
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.
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.
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
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
308# These options get exported to #defines in config/*.hh (see src/SConscript).
305# These options get exported to #defines in config/*.hh (see m5/SConscript).
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

--- 153 unchanged lines hidden (view full) ---

470 print "Warning: MySQL not available; " \
471 "forcing USE_MYSQL to False in", build_dir + "."
472 env['USE_MYSQL'] = False
473 else:
474 print "Compiling in", build_dir, "with MySQL support."
475 env.ParseConfig(mysql_config_libs)
476 env.ParseConfig(mysql_config_include)
477
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

--- 153 unchanged lines hidden (view full) ---

467 print "Warning: MySQL not available; " \
468 "forcing USE_MYSQL to False in", build_dir + "."
469 env['USE_MYSQL'] = False
470 else:
471 print "Compiling in", build_dir, "with MySQL support."
472 env.ParseConfig(mysql_config_libs)
473 env.ParseConfig(mysql_config_include)
474
478 # Check if the Checker is being used. If so append it to env['CPU_MODELS']
479 if env['USE_CHECKER']:
480 env['CPU_MODELS'].append('CheckerCPU')
481
482 # Save sticky option settings back to current options file
483 sticky_opts.Save(current_opts_file, env)
484
485 # Do this after we save setting back, or else we'll tack on an
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
475 # Save sticky option settings back to current options file
476 sticky_opts.Save(current_opts_file, env)
477
478 # Do this after we save setting back, or else we'll tack on an
479 # extra 'qdo' every time we run scons.
480 if env['BATCH']:
481 env['CC'] = env['BATCH_CMD'] + ' ' + env['CC']
482 env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX']
483
484 if env['USE_SSE2']:
485 env.Append(CCFLAGS='-msse2')
486
494 # The src/SConscript file sets up the build rules in 'env' according
487 # The m5/SConscript file sets up the build rules in 'env' according
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 ---
488 # to the configured options. It returns a list of environments,
489 # one for each variant build (debug, opt, etc.)
490 envList = SConscript('src/SConscript', build_dir = build_path,
491 exports = 'env')
492
493 # Set up the regression tests for each build.
494# for e in envList:
495# SConscript('m5-test/SConscript',

--- 12 unchanged lines hidden ---