diff options
author | Serge Guelton <sguelton@quarkslab.com> | 2019-01-11 19:04:48 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@quarkslab.com> | 2019-01-11 19:04:48 +0000 |
commit | 0b641d6dce94c10f49c8c6cda512e145cfbf05eb (patch) | |
tree | 16c00e7f6428d0cf1302446341f20e25a60d93dc /utils | |
parent | e234e3263d0bf538e9c5682ff0b50c230ebe7b24 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/perf-training/perf-helper.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/perf-training/perf-helper.py b/utils/perf-training/perf-helper.py index 72b4b4e5a0..65afbb6ed5 100644 --- a/utils/perf-training/perf-helper.py +++ b/utils/perf-training/perf-helper.py @@ -114,7 +114,7 @@ def get_cc1_command_for_args(cmd, env): # 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 @@ def genOrderFile(args): # 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 |