[PATCH] D54071: [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 11 11:09:33 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL350955: [Bug 39548][Clang] PGO bootstrap fails with python3: errors in perf-helper.py (authored by serge_sans_paille, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D54071?vs=181140&id=181327#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54071/new/

https://reviews.llvm.org/D54071

Files:
  cfe/trunk/utils/perf-training/perf-helper.py


Index: cfe/trunk/utils/perf-training/perf-helper.py
===================================================================
--- cfe/trunk/utils/perf-training/perf-helper.py
+++ cfe/trunk/utils/perf-training/perf-helper.py
@@ -114,7 +114,7 @@
   # Find the cc1 command used by the compiler. To do this we execute the
   # compiler with '-###' to figure out what it wants to do.
   cmd = cmd + ['-###']
-  cc_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env).strip()
+  cc_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env, universal_newlines=True).strip()
   cc_commands = []
   for ln in cc_output.split('\n'):
       # Filter out known garbage.
@@ -340,7 +340,7 @@
   # If the user gave us a binary, get all the symbols in the binary by
   # snarfing 'nm' output.
   if opts.binary_path is not None:
-     output = subprocess.check_output(['nm', '-P', opts.binary_path])
+     output = subprocess.check_output(['nm', '-P', opts.binary_path], universal_newlines=True)
      lines = output.split("\n")
      all_symbols = [ln.split(' ',1)[0]
                     for ln in lines


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54071.181327.patch
Type: text/x-patch
Size: 1119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190111/c5a5fbf3/attachment.bin>


More information about the cfe-commits mailing list