Deleted Added
sdiff udiff text old ( 12061:0225580779db ) new ( 12063:06cd2c297b04 )
full compact
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015, 2016 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

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

178 action='store_true',
179 help="Build with support for C++-based configuration")
180AddLocalOption('--default', dest='default', type='string', action='store',
181 help='Override which build_opts file to use for defaults')
182AddLocalOption('--ignore-style', dest='ignore_style', action='store_true',
183 help='Disable style checking hooks')
184AddLocalOption('--no-lto', dest='no_lto', action='store_true',
185 help='Disable Link-Time Optimization for fast')
186AddLocalOption('--update-ref', dest='update_ref', action='store_true',
187 help='Update test reference outputs')
188AddLocalOption('--verbose', dest='verbose', action='store_true',
189 help='Print full tool command lines')
190AddLocalOption('--without-python', dest='without_python',
191 action='store_true',
192 help='Build without Python configuration support')
193AddLocalOption('--without-tcmalloc', dest='without_tcmalloc',
194 action='store_true',
195 help='Disable linking against tcmalloc')
196AddLocalOption('--with-ubsan', dest='with_ubsan', action='store_true',
197 help='Build with Undefined Behavior Sanitizer if available')
198AddLocalOption('--with-asan', dest='with_asan', action='store_true',
199 help='Build with Address Sanitizer if available')
200
201termcap = get_termcap(GetOption('use_colors'))
202
203########################################################################
204#
205# Set up the main build environment.
206#
207########################################################################
208

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

714 gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False)
715 if compareVersions(gcc_version, "4.8") < 0:
716 print 'Error: gcc version 4.8 or newer required.'
717 print ' Installed version:', gcc_version
718 Exit(1)
719
720 main['GCC_VERSION'] = gcc_version
721
722 # gcc from version 4.8 and above generates "rep; ret" instructions
723 # to avoid performance penalties on certain AMD chips. Older
724 # assemblers detect this as an error, "Error: expecting string
725 # instruction after `rep'"
726 as_version_raw = readCommand([main['AS'], '-v', '/dev/null',
727 '-o', '/dev/null'],
728 exception=False).split()
729

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

744 # Undefined Benahvior Sanitizer and this version of gcc does not
745 # support it.
746 if GetOption('with_ubsan') and \
747 compareVersions(gcc_version, '4.9') < 0:
748 print termcap.Yellow + termcap.Bold + \
749 'Warning: UBSan is only supported using gcc 4.9 and later.' + \
750 termcap.Normal
751
752 # Add the appropriate Link-Time Optimization (LTO) flags
753 # unless LTO is explicitly turned off. Note that these flags
754 # are only used by the fast target.
755 if not GetOption('no_lto'):
756 # Pass the LTO flag when compiling to produce GIMPLE
757 # output, we merely create the flags here and only append
758 # them later
759 main['LTO_CCFLAGS'] = ['-flto=%d' % GetOption('num_jobs')]
760
761 # Use the same amount of jobs for LTO as we are running
762 # scons with
763 main['LTO_LDFLAGS'] = ['-flto=%d' % GetOption('num_jobs')]

--- 782 unchanged lines hidden ---