blob: b8a325295d5ee5d4c6a78a92855519bd530ea2ec [file] [log] [blame]
Andrew Geisslerd688a012020-09-18 13:36:00 -05001From 8295bb6a60896fed54d6450bca091aea4eea4fb2 Mon Sep 17 00:00:00 2001
Brad Bishop0a921262019-09-24 07:40:45 -04002From: Vincent Prince <vincent.prince.fr@gmail.com>
3Date: Mon, 16 Sep 2019 13:21:44 +0200
4Subject: [PATCH 01/10] Tell scons to use build settings from environment
5 variables
Brad Bishop316dfdd2018-06-25 12:45:53 -04006
7Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
Brad Bishop0a921262019-09-24 07:40:45 -04008Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -04009---
Andrew Geisslerd688a012020-09-18 13:36:00 -050010 SConstruct | 8 ++++++--
11 1 file changed, 6 insertions(+), 2 deletions(-)
Brad Bishop316dfdd2018-06-25 12:45:53 -040012
Brad Bishop0a921262019-09-24 07:40:45 -040013diff --git a/SConstruct b/SConstruct
Andrew Geisslerd688a012020-09-18 13:36:00 -050014index 89c044ab78..2044c0ddb8 100644
Brad Bishop0a921262019-09-24 07:40:45 -040015--- a/SConstruct
16+++ b/SConstruct
Andrew Geisslerd688a012020-09-18 13:36:00 -050017@@ -593,6 +593,7 @@ def variable_arch_converter(val):
Brad Bishop316dfdd2018-06-25 12:45:53 -040018 'amd64': 'x86_64',
19 'emt64': 'x86_64',
20 'x86': 'i386',
21+ 'aarch64': 'arm64',
22 }
23 val = val.lower()
24
Andrew Geisslerd688a012020-09-18 13:36:00 -050025@@ -723,7 +724,8 @@ env_vars.Add(
Brad Bishop316dfdd2018-06-25 12:45:53 -040026 )
27
28 env_vars.Add('CC',
29- help='Select the C compiler to use')
30+ help='Select the C compiler to use',
31+ default=os.getenv('CC'))
32
33 env_vars.Add('CCFLAGS',
34 help='Sets flags for the C and C++ compiler',
Andrew Geisslerd688a012020-09-18 13:36:00 -050035@@ -743,7 +745,8 @@ env_vars.Add('CPPPATH',
Brad Bishop316dfdd2018-06-25 12:45:53 -040036 converter=variable_shlex_converter)
37
38 env_vars.Add('CXX',
39- help='Select the C++ compiler to use')
40+ help='Select the C++ compiler to use',
41+ default=os.getenv('CXX'))
42
43 env_vars.Add('CXXFLAGS',
44 help='Sets flags for the C++ compiler',
Andrew Geisslerd688a012020-09-18 13:36:00 -050045@@ -1127,6 +1130,7 @@ if get_option('build-tools') == 'next' or get_option('ninja') == 'next':
46 SCons.Tool.DefaultToolpath.insert(0, os.path.abspath('site_scons/site_tools/next'))
Brad Bishop316dfdd2018-06-25 12:45:53 -040047
48 env = Environment(variables=env_vars, **envDict)
49+env.PrependENVPath('PATH', os.getenv('PATH'))
Brad Bishop316dfdd2018-06-25 12:45:53 -040050
Andrew Geisslerd688a012020-09-18 13:36:00 -050051 # Only print the spinner if stdout is a tty
52 if sys.stdout.isatty():
Brad Bishop0a921262019-09-24 07:40:45 -040053--
Andrew Geisslerd688a012020-09-18 13:36:00 -0500542.24.0
Brad Bishop0a921262019-09-24 07:40:45 -040055