Skip to content

Commit f8dded2

Browse files
committedJan 11, 2019
[Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py
Current clang fail to bootstrap in PGO mode when only python3 is available, because perf-helper.py is not compatible with python3. Commited on behalf of Romain Geissler. Differential Revision: https://reviews.llvm.org/D54071 llvm-svn: 350955
1 parent 47bcdcd commit f8dded2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎clang/utils/perf-training/perf-helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_cc1_command_for_args(cmd, env):
114114
# Find the cc1 command used by the compiler. To do this we execute the
115115
# compiler with '-###' to figure out what it wants to do.
116116
cmd = cmd + ['-###']
117-
cc_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env).strip()
117+
cc_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env, universal_newlines=True).strip()
118118
cc_commands = []
119119
for ln in cc_output.split('\n'):
120120
# Filter out known garbage.
@@ -340,7 +340,7 @@ def genOrderFile(args):
340340
# If the user gave us a binary, get all the symbols in the binary by
341341
# snarfing 'nm' output.
342342
if opts.binary_path is not None:
343-
output = subprocess.check_output(['nm', '-P', opts.binary_path])
343+
output = subprocess.check_output(['nm', '-P', opts.binary_path], universal_newlines=True)
344344
lines = output.split("\n")
345345
all_symbols = [ln.split(' ',1)[0]
346346
for ln in lines

0 commit comments

Comments
 (0)
Please sign in to comment.