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 the following error when using Python 3:
Traceback (most recent call last): File "<home>/llvm-project/libcxx/utils/merge_archives.py", line 156, in <module> main() File "<home>/llvm-project/libcxx/utils/merge_archives.py", line 152, in main cwd=temp_directory_root, verbose=args.verbose) File "<home>/llvm-project/libcxx/utils/merge_archives.py", line 70, in execute_command_verbose out, err, exitCode = execute_command(cmd, cwd=cwd) File "<home>/llvm-project/libcxx/utils/merge_archives.py", line 58, in execute_command p = subprocess.Popen(cmd, **kwargs) File "<python>/lib/subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "<python>/lib/subprocess.py", line 1119, in _execute_child args = list2cmdline(args) File "<python>/lib/subprocess.py", line 530, in list2cmdline needquote = (" " in arg) or ("\t" in arg) or not arg TypeError: a bytes-like object is required, not 'str'
With this patch merge_archives.py works fine with Python 3