[compiler-rt] 35188e0 - [dfsan] Fix build-libc-list.py for Python 3 after D143701

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 10:55:48 PST 2023


Author: Fangrui Song
Date: 2023-02-10T10:55:44-08:00
New Revision: 35188e02d1f2ca57ed2d0bf6f0045ee95779b0fe

URL: https://github.com/llvm/llvm-project/commit/35188e02d1f2ca57ed2d0bf6f0045ee95779b0fe
DIFF: https://github.com/llvm/llvm-project/commit/35188e02d1f2ca57ed2d0bf6f0045ee95779b0fe.diff

LOG: [dfsan] Fix build-libc-list.py for Python 3 after D143701

Added: 
    

Modified: 
    compiler-rt/lib/dfsan/scripts/build-libc-list.py

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/dfsan/scripts/build-libc-list.py b/compiler-rt/lib/dfsan/scripts/build-libc-list.py
index 5452252c04b3a..a90649d1c293f 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:


        


More information about the llvm-commits mailing list