Commit Graph

9 Commits

Author SHA1 Message Date
Louis Dionne
244334750d [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356903 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-25 14:56:29 +00:00
Petr Hosek
fc1ec361d3 [libcxx] Preserve order, avoid duplicates when merging static archives
glob can return files in arbitrary order which breaks deterministic
builds. Rather, use `ar t` to list the files in each archive and
preserve the original order. Using `ar q` results in duplicate entries
in the archive, instead use `ar r` to avoid duplicates.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353671 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-11 08:48:47 +00:00
Chandler Carruth
7c3769df62 Update more file headers across all of the LLVM projects in the monorepo
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@351648 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 10:56:40 +00:00
Martin Storsjo
5f919fe349 Use CMAKE_AR instead of the system default 'ar' for merging static libraries
Using the system default 'ar' might not be the right choice when
cross compiling.

Don't prepend the ar options by a dash, not all ar implementations
support that (llvm-ar doesn't).

Also pass the 's' option when creating the merged library, to create
an index.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13 06:55:44 +00:00
Martell Malone
8122e2490e libcxx: fix merge_archives error variable name
Differential Revision: https://reviews.llvm.org/D37728

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12 22:32:02 +00:00
Martin Storsjo
2c607f47f9 Handle object files named *.obj in merge_archives.py
Differential Revision: https://reviews.llvm.org/D37133

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313072 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12 20:54:15 +00:00
Eric Fiselier
60479ea31b Make LIBCXX_ENABLE_STATIC_ABI_LIBRARY merge libc++.a and libc++abi.a
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 19:53:45 +00:00
Eric Fiselier
d3b197fcb5 Make merge_archives.py executable
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 11:29:05 +00:00
Eric Fiselier
fa054d2ad0 Add merge_archives.py utility
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 11:26:14 +00:00