[libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platforms
Summary:
I can't see a good reason to disallow this, even though it isn't the
standard way we build libc++ for Apple platforms.
Making this work on Apple platforms requires using different flags for
--whole-archive and removing the -D flag when running `ar` to merge
archives because that flag isn't supported by the `ar` shipped on Apple
platforms. This shouldn't be an issue since the -D option appears to be
enabled by default in GNU `ar`.
Reviewers: phosek, EricWF, serge-sans-paille
Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59513
llvm-svn: 356903
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 976073794edf83b5e25c5c3bc285a1c2505bac9e
diff --git a/utils/merge_archives.py b/utils/merge_archives.py
index e57afab..75d7a54 100755
--- a/utils/merge_archives.py
+++ b/utils/merge_archives.py
@@ -127,7 +127,7 @@
out = execute_command_verbose([ar_exe, 't', arc])
files.extend(out.splitlines())
- execute_command_verbose([ar_exe, 'rcsD', args.output] + files,
+ execute_command_verbose([ar_exe, 'rcs', args.output] + files,
cwd=temp_directory_root, verbose=args.verbose)