[libcxx] When merging archives, build index even on Darwin
authorPetr Hosek <phosek@google.com>
Thu, 6 Feb 2020 03:42:18 +0000 (19:42 -0800)
committerPetr Hosek <phosek@google.com>
Mon, 2 Mar 2020 19:02:42 +0000 (11:02 -0800)
We always want to build the table of contents. Additionally, we also
set the flag to make the output deterministic which is already the
default for llvm-ar.

Differential Revision: https://reviews.llvm.org/D74108

libcxx/utils/merge_archives.py

index 4c31854..d784ea0 100755 (executable)
@@ -143,10 +143,10 @@ def main():
 
     if args.use_libtool:
         files = [f for f in files if not f.startswith('__.SYMDEF')]
-        execute_command_verbose([libtool_exe, '-static', '-o', args.output] + files,
+        execute_command_verbose([libtool_exe, '-static', '-o', args.output, '-sD'] + files,
                                 cwd=temp_directory_root, verbose=args.verbose)
     else:
-        execute_command_verbose([ar_exe, 'rcs', args.output] + files,
+        execute_command_verbose([ar_exe, 'rcsD', args.output] + files,
                                 cwd=temp_directory_root, verbose=args.verbose)