0001-Tell-scons-to-use-build-settings-from-environment-va.patch 2.1 KB

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