Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 1 | From 8295bb6a60896fed54d6450bca091aea4eea4fb2 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 2 | From: Vincent Prince <vincent.prince.fr@gmail.com> |
| 3 | Date: Mon, 16 Sep 2019 13:21:44 +0200 |
| 4 | Subject: [PATCH 01/10] Tell scons to use build settings from environment |
| 5 | variables |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 6 | |
| 7 | Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 8 | Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 9 | --- |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 10 | SConstruct | 8 ++++++-- |
| 11 | 1 file changed, 6 insertions(+), 2 deletions(-) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 13 | diff --git a/SConstruct b/SConstruct |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 14 | index 89c044ab78..2044c0ddb8 100644 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 15 | --- a/SConstruct |
| 16 | +++ b/SConstruct |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 17 | @@ -593,6 +593,7 @@ def variable_arch_converter(val): |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | 'amd64': 'x86_64', |
| 19 | 'emt64': 'x86_64', |
| 20 | 'x86': 'i386', |
| 21 | + 'aarch64': 'arm64', |
| 22 | } |
| 23 | val = val.lower() |
| 24 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 25 | @@ -723,7 +724,8 @@ env_vars.Add( |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 26 | ) |
| 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 Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 35 | @@ -743,7 +745,8 @@ env_vars.Add('CPPPATH', |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 36 | 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 Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 45 | @@ -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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 47 | |
| 48 | env = Environment(variables=env_vars, **envDict) |
| 49 | +env.PrependENVPath('PATH', os.getenv('PATH')) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 50 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 51 | # Only print the spinner if stdout is a tty |
| 52 | if sys.stdout.isatty(): |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 53 | -- |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 54 | 2.24.0 |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 55 | |