SConstruct (12242:585b6820ced0) SConstruct (12243:c56b7387cddc)
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015-2017 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) ---

178termcap = get_termcap(GetOption('use_colors'))
179
180########################################################################
181#
182# Set up the main build environment.
183#
184########################################################################
185
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015-2017 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) ---

178termcap = get_termcap(GetOption('use_colors'))
179
180########################################################################
181#
182# Set up the main build environment.
183#
184########################################################################
185
186# export TERM so that clang reports errors in color
187use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
188 'LIBRARY_PATH', 'PATH', 'PKG_CONFIG_PATH', 'PROTOC',
189 'PYTHONPATH', 'RANLIB', 'TERM' ])
186main = Environment()
190
187
191use_prefixes = [
192 "ASAN_", # address sanitizer symbolizer path and settings
193 "CCACHE_", # ccache (caching compiler wrapper) configuration
194 "CCC_", # clang static analyzer configuration
195 "DISTCC_", # distcc (distributed compiler wrapper) configuration
196 "INCLUDE_SERVER_", # distcc pump server settings
197 "M5", # M5 configuration (e.g., path to kernels)
198 ]
199
200use_env = {}
201for key,val in sorted(os.environ.iteritems()):
202 if key in use_vars or \
203 any([key.startswith(prefix) for prefix in use_prefixes]):
204 use_env[key] = val
205
206# Tell scons to avoid implicit command dependencies to avoid issues
207# with the param wrappes being compiled twice (see
208# http://scons.tigris.org/issues/show_bug.cgi?id=2811)
209main = Environment(ENV=use_env, IMPLICIT_COMMAND_DEPENDENCIES=0)
210main.Decider('MD5-timestamp')
211main.root = Dir(".") # The current directory (where this file lives).
212main.srcdir = Dir("src") # The source directory
213
214main_dict_keys = main.Dictionary().keys()
215
216# Check that we have a C/C++ compiler
217if not ('CC' in main_dict_keys and 'CXX' in main_dict_keys):
218 print "No C++ compiler installed (package g++ on Ubuntu and RedHat)"
219 Exit(1)
220
221# add useful python code PYTHONPATH so it can be used by subprocesses

--- 1308 unchanged lines hidden ---
188main_dict_keys = main.Dictionary().keys()
189
190# Check that we have a C/C++ compiler
191if not ('CC' in main_dict_keys and 'CXX' in main_dict_keys):
192 print "No C++ compiler installed (package g++ on Ubuntu and RedHat)"
193 Exit(1)
194
195# add useful python code PYTHONPATH so it can be used by subprocesses

--- 1308 unchanged lines hidden ---