From: Fangrui Song Date: Fri, 10 Feb 2023 18:55:44 +0000 (-0800) Subject: [dfsan] Fix build-libc-list.py for Python 3 after D143701 X-Git-Tag: upstream/17.0.6~17897 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35188e02d1f2ca57ed2d0bf6f0045ee95779b0fe;p=platform%2Fupstream%2Fllvm.git [dfsan] Fix build-libc-list.py for Python 3 after D143701 --- diff --git a/compiler-rt/lib/dfsan/scripts/build-libc-list.py b/compiler-rt/lib/dfsan/scripts/build-libc-list.py index 5452252c04b3..a90649d1c293 100755 --- a/compiler-rt/lib/dfsan/scripts/build-libc-list.py +++ b/compiler-rt/lib/dfsan/scripts/build-libc-list.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- lib/dfsan/scripts/build-libc-list.py ---------------------------------===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. @@ -44,7 +44,7 @@ def defined_function_list(object): functions = [] readelf_proc = subprocess.Popen(['readelf', '-s', '-W', object], stdout=subprocess.PIPE) - readelf = readelf_proc.communicate()[0].split('\n') + readelf = readelf_proc.communicate()[0].decode().split('\n') if readelf_proc.returncode != 0: raise subprocess.CalledProcessError(readelf_proc.returncode, 'readelf') for line in readelf: