Deleted Added
sdiff udiff text old ( 5396:0347e9a6d2c2 ) new ( 5397:58e5b68f7095 )
full compact
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

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

298
299global_sticky_opts_file = joinpath(build_root, 'options.global')
300
301global_sticky_opts = Options(global_sticky_opts_file, args=ARGUMENTS)
302
303global_sticky_opts.AddOptions(
304 ('CC', 'C compiler', os.environ.get('CC', env['CC'])),
305 ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])),
306 ('EXTRAS', 'Add Extra directories to the compilation', '',
307 PathListAllExist, PathListMakeAbsolute)
308 )
309
310
311# base help text
312help_text = '''
313Usage: scons [scons options] [build options] [target(s)]

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

364 env.Append(CCFLAGS='-library=stlport4')
365 env.Append(CCFLAGS='-xar')
366# env.Append(CCFLAGS='-instances=semiexplicit')
367else:
368 print 'Error: Don\'t know what compiler options to use for your compiler.'
369 print ' Please fix SConstruct and src/SConscript and try again.'
370 Exit(1)
371
372if sys.platform == 'cygwin':
373 # cygwin has some header file issues...
374 env.Append(CCFLAGS=Split("-Wno-uninitialized"))
375env.Append(CPPPATH=[Dir('ext/dnet')])
376
377# Check for SWIG
378if not env.has_key('SWIG'):
379 print 'Error: SWIG utility not found.'

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

432 if uname[0] == 'Darwin' and compare_versions(uname[2], '9.0.0') >= 0:
433 if int(subprocess.Popen('sysctl -n hw.cpu64bit_capable', shell=True,
434 stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
435 close_fds=True).communicate()[0][0]):
436 env.Append(CCFLAGS='-arch x86_64')
437 env.Append(CFLAGS='-arch x86_64')
438 env.Append(LINKFLAGS='-arch x86_64')
439 env.Append(ASFLAGS='-arch x86_64')
440 env['OSX64bit'] = True
441except:
442 pass
443
444# Recent versions of scons substitute a "Null" object for Configure()
445# when configuration isn't necessary, e.g., if the "--help" option is
446# present. Unfortuantely this Null object always returns false,
447# breaking all our configuration checks. We replace it with our own
448# more optimistic null object that returns True instead.

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

587 'Make floating-point results compatible with SimpleScalar',
588 False),
589 BoolOption('USE_SSE2',
590 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
591 False),
592 BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql),
593 BoolOption('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv),
594 BoolOption('USE_CHECKER', 'Use checker for detailed CPU models', False),
595 BoolOption('BATCH', 'Use batch pool for build and tests', False),
596 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
597 ('PYTHONHOME',
598 'Override the default PYTHONHOME for this system (use with caution)',
599 '%s:%s' % (sys.prefix, sys.exec_prefix)),
600 )
601
602nonsticky_opts.AddOptions(
603 BoolOption('update_ref', 'Update test reference outputs', False)
604 )

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

814 else:
815 print "Compiling in", build_dir, "with MySQL support."
816 env.ParseConfig(mysql_config_libs)
817 env.ParseConfig(mysql_config_include)
818
819 # Save sticky option settings back to current options file
820 sticky_opts.Save(current_opts_file, env)
821
822 # Do this after we save setting back, or else we'll tack on an
823 # extra 'qdo' every time we run scons.
824 if env['BATCH']:
825 env['CC'] = env['BATCH_CMD'] + ' ' + env['CC']
826 env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX']
827
828 if env['USE_SSE2']:
829 env.Append(CCFLAGS='-msse2')
830
831 # The src/SConscript file sets up the build rules in 'env' according
832 # to the configured options. It returns a list of environments,
833 # one for each variant build (debug, opt, etc.)
834 envList = SConscript('src/SConscript', build_dir = build_path,
835 exports = 'env')

--- 17 unchanged lines hidden ---