Fix make asan

Suppress leak detection when running gen-go-code.py otherwise it fails
since python always leaks
This commit is contained in:
Kovid Goyal 2022-12-03 12:34:32 +05:30
parent 76f6288e69
commit 5c9c9a67bc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -891,7 +891,10 @@ def update_go_generated_files(args: Options, kitty_exe: str) -> None:
# update all the various auto-generated go files, if needed
if args.verbose:
print('Updating Go generated files...', flush=True)
cp = subprocess.run([kitty_exe, '+launch', os.path.join(src_base, 'gen-go-code.py')], stdout=subprocess.PIPE)
env = os.environ.copy()
env['ASAN_OPTIONS'] = 'detect_leaks=0'
cp = subprocess.run([kitty_exe, '+launch', os.path.join(src_base, 'gen-go-code.py')], stdout=subprocess.PIPE, env=env)
if cp.returncode != 0:
raise SystemExit(cp.returncode)