blob: aa01e954f7457a0d4935846045cfad7769f2dac8 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 53368d3f4adc09dd84234a9af31771bcd8ca2757 Mon Sep 17 00:00:00 2001
2From: Sven Ebenfeld <sven.ebenfeld@gmail.com>
3Date: Fri, 15 Jan 2016 22:41:28 +0100
4Subject: [PATCH] Tell scons to use build settings from environment variables
5
6Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
7---
8 SConstruct | 8 ++++++--
9 src/mongo/util/SConscript | 2 ++
10 2 files changed, 8 insertions(+), 2 deletions(-)
11
12Index: git/SConstruct
13===================================================================
14--- git.orig/SConstruct
15+++ git/SConstruct
16@@ -548,6 +548,7 @@ def variable_arch_converter(val):
17 'amd64': 'x86_64',
18 'emt64': 'x86_64',
19 'x86': 'i386',
20+ 'aarch64': 'arm64',
21 }
22 val = val.lower()
23
24@@ -627,7 +628,8 @@ env_vars.Add(
25 )
26
27 env_vars.Add('CC',
28- help='Select the C compiler to use')
29+ help='Select the C compiler to use',
30+ default=os.getenv('CC'))
31
32 env_vars.Add('CCFLAGS',
33 help='Sets flags for the C and C++ compiler',
34@@ -647,7 +649,8 @@ env_vars.Add('CPPPATH',
35 converter=variable_shlex_converter)
36
37 env_vars.Add('CXX',
38- help='Select the C++ compiler to use')
39+ help='Select the C++ compiler to use',
40+ default=os.getenv('CXX'))
41
42 env_vars.Add('CXXFLAGS',
43 help='Sets flags for the C++ compiler',
44@@ -895,6 +898,7 @@ envDict = dict(BUILD_ROOT=buildDir,
45 )
46
47 env = Environment(variables=env_vars, **envDict)
48+env.PrependENVPath('PATH', os.getenv('PATH'))
49 del envDict
50
51 env.AddMethod(env_os_is_wrapper, 'TargetOSIs')
52Index: git/src/mongo/util/SConscript
53===================================================================
54--- git.orig/src/mongo/util/SConscript
55+++ git/src/mongo/util/SConscript
56@@ -274,6 +274,8 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc':
57 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS'
58 ]
59 )
60+ if not use_system_version_of_library('valgrind'):
61+ tcmspEnv.InjectThirdPartyIncludePaths('valgrind')
62
63 if not use_system_version_of_library('valgrind'):
64 # Include valgrind since tcmalloc disables itself while running under valgrind