From 9e5bbefc9b508b0e51057e7653b349ee5c831388 Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Mon, 12 Feb 2018 16:43:30 +1100 Subject: [PATCH] msan-builder: Set MSAN_NO_TRACK_ORIGINS in child environment too. --- infra/base-images/msan-builder/msan_build.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/infra/base-images/msan-builder/msan_build.py b/infra/base-images/msan-builder/msan_build.py index 34803d50f..928b1a596 100755 --- a/infra/base-images/msan-builder/msan_build.py +++ b/infra/base-images/msan-builder/msan_build.py @@ -331,10 +331,11 @@ def GetBuildList(package_name): class MSanBuilder(object): """MSan builder.""" - def __init__(self, debug=False, log_path=None, work_dir=None): + def __init__(self, debug=False, log_path=None, work_dir=None, no_track_origins=False): self.debug = debug self.log_path = log_path self.work_dir = work_dir + self.no_track_origins = no_track_origins self.env = None def __enter__(self): @@ -350,6 +351,9 @@ class MSanBuilder(object): if self.debug and self.log_path: self.env['WRAPPER_DEBUG_LOG_PATH'] = self.log_path + if self.no_track_origins: + self.env['MSAN_NO_TRACK_ORIGINS'] = '1' + return self def __exit__(self, exc_type, exc_value, traceback): @@ -442,7 +446,8 @@ def main(): print('\t', package_name) with MSanBuilder(debug=args.debug, log_path=args.log_path, - work_dir=args.work_dir) as builder: + work_dir=args.work_dir, + no_track_origins=args.no_track_origins) as builder: for package_name in package_names: builder.Build(package_name, args.output_dir, args.create_subdirs)