[infra] msan builder: wrap dpkg-gensymbols.

This commit is contained in:
Oliver Chang 2017-11-22 14:01:06 -08:00
parent 0b44a69baf
commit a023ed88c7
1 changed files with 10 additions and 0 deletions

View File

@ -79,6 +79,16 @@ def SetUpEnvironment(work_dir):
env['DEB_LDFLAGS_APPEND'] = MSAN_OPTIONS env['DEB_LDFLAGS_APPEND'] = MSAN_OPTIONS
env['DPKG_GENSYMBOLS_CHECK_LEVEL'] = '0' env['DPKG_GENSYMBOLS_CHECK_LEVEL'] = '0'
# debian/rules can set DPKG_GENSYMBOLS_CHECK_LEVEL explicitly, so override it.
dpkg_gensymbols_path = os.path.join(bin_dir, 'dpkg-gensymbols')
with open(dpkg_gensymbols_path, 'w') as f:
f.write(
'#!/bin/sh\n'
'export DPKG_GENSYMBOLS_CHECK_LEVEL=0\n'
'/usr/bin/dpkg-gensymbols "$@"\n')
os.chmod(dpkg_gensymbols_path, 0755)
env['PATH'] = bin_dir + ':' + os.environ['PATH'] env['PATH'] = bin_dir + ':' + os.environ['PATH']
# Prevent entire build from failing because of bugs/uninstrumented in tools # Prevent entire build from failing because of bugs/uninstrumented in tools