Deleted Added
sdiff udiff text old ( 11988:665cd5f8b52b ) new ( 11989:dbb16376953c )
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

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

204#
205# Set up the main build environment.
206#
207########################################################################
208
209# export TERM so that clang reports errors in color
210use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
211 'LIBRARY_PATH', 'PATH', 'PKG_CONFIG_PATH', 'PROTOC',
212 'PYTHONPATH', 'RANLIB', 'TERM' ])
213
214use_prefixes = [
215 "ASAN_", # address sanitizer symbolizer path and settings
216 "CCACHE_", # ccache (caching compiler wrapper) configuration
217 "CCC_", # clang static analyzer configuration
218 "DISTCC_", # distcc (distributed compiler wrapper) configuration
219 "INCLUDE_SERVER_", # distcc pump server settings
220 "M5", # M5 configuration (e.g., path to kernels)

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

236
237main_dict_keys = main.Dictionary().keys()
238
239# Check that we have a C/C++ compiler
240if not ('CC' in main_dict_keys and 'CXX' in main_dict_keys):
241 print "No C++ compiler installed (package g++ on Ubuntu and RedHat)"
242 Exit(1)
243
244# add useful python code PYTHONPATH so it can be used by subprocesses
245# as well
246main.AppendENVPath('PYTHONPATH', extra_python_paths)
247
248########################################################################
249#
250# Mercurial Stuff.
251#

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

514
515global_vars_file = joinpath(build_root, 'variables.global')
516
517global_vars = Variables(global_vars_file, args=ARGUMENTS)
518
519global_vars.AddVariables(
520 ('CC', 'C compiler', environ.get('CC', main['CC'])),
521 ('CXX', 'C++ compiler', environ.get('CXX', main['CXX'])),
522 ('PROTOC', 'protoc tool', environ.get('PROTOC', 'protoc')),
523 ('BATCH', 'Use batch pool for build and tests', False),
524 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
525 ('M5_BUILD_CACHE', 'Cache built objects in this directory', False),
526 ('EXTRAS', 'Add extra directories to the compilation', '')
527 )
528
529# Update main environment with values from ARGUMENTS & global_vars_file

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

634if GetOption('verbose'):
635 def MakeAction(action, string, *args, **kwargs):
636 return Action(action, *args, **kwargs)
637else:
638 MakeAction = Action
639 main['CCCOMSTR'] = Transform("CC")
640 main['CXXCOMSTR'] = Transform("CXX")
641 main['ASCOMSTR'] = Transform("AS")
642 main['ARCOMSTR'] = Transform("AR", 0)
643 main['LINKCOMSTR'] = Transform("LINK", 0)
644 main['SHLINKCOMSTR'] = Transform("SHLINK", 0)
645 main['RANLIBCOMSTR'] = Transform("RANLIB", 0)
646 main['M4COMSTR'] = Transform("M4")
647 main['SHCCCOMSTR'] = Transform("SHCC")
648 main['SHCXXCOMSTR'] = Transform("SHCXX")
649Export('MakeAction')

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

879 # Attempt to establish what linking flags to add for protobuf
880 # using pkg-config
881 main.ParseConfig('pkg-config --cflags --libs-only-L protobuf')
882 except:
883 print termcap.Yellow + termcap.Bold + \
884 'Warning: pkg-config could not get protobuf flags.' + \
885 termcap.Normal
886
887
888# Check for 'timeout' from GNU coreutils. If present, regressions will
889# be run with a time limit. We require version 8.13 since we rely on
890# support for the '--foreground' option.
891if sys.platform.startswith('freebsd'):
892 timeout_lines = readCommand(['gtimeout', '--version'],
893 exception='').splitlines()
894else:
895 timeout_lines = readCommand(['timeout', '--version'],
896 exception='').splitlines()
897# Get the first line and tokenize it
898timeout_version = timeout_lines[0].split() if timeout_lines else []
899main['TIMEOUT'] = timeout_version and \
900 compareVersions(timeout_version[-1], '8.13') >= 0
901
902# Add a custom Check function to test for structure members.
903def CheckMember(context, include, decl, member, include_quotes="<>"):
904 context.Message("Checking for member %s in %s..." %
905 (member, decl))
906 text = """
907#include %(header)s
908int main(){
909 %(decl)s test;

--- 647 unchanged lines hidden ---