[libcxx-commits] [libcxx] r369764 - [libc++] Improve Python 3 compatibility for merge_archives.py
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 23 08:05:55 PDT 2019
Author: ldionne
Date: Fri Aug 23 08:05:54 2019
New Revision: 369764
URL: http://llvm.org/viewvc/llvm-project?rev=369764&view=rev
Log:
[libc++] Improve Python 3 compatibility for merge_archives.py
Popen.communicate() method in Python 2 returns a pair of strings, and in
Python 3 it returns a pair of byte-like objects unless universal_newlines
is set to True. This led to an error when using Python 3. With this patch,
merge_archives.py works fine with Python 3.
Thanks to Sergej Jaskiewicz for the patch.
Differential Revision: https://reviews.llvm.org/D66649
Modified:
libcxx/trunk/utils/merge_archives.py
Modified: libcxx/trunk/utils/merge_archives.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/merge_archives.py?rev=369764&r1=369763&r2=369764&view=diff
==============================================================================
--- libcxx/trunk/utils/merge_archives.py (original)
+++ libcxx/trunk/utils/merge_archives.py Fri Aug 23 08:05:54 2019
@@ -50,7 +50,8 @@ def execute_command(cmd, cwd=None):
'stdin': subprocess.PIPE,
'stdout': subprocess.PIPE,
'stderr': subprocess.PIPE,
- 'cwd': cwd
+ 'cwd': cwd,
+ 'universal_newlines': True
}
p = subprocess.Popen(cmd, **kwargs)
out, err = p.communicate()
More information about the libcxx-commits
mailing list