This is an archive of the discontinued LLVM Phabricator instance.

[gn] Support for building libc++
ClosedPublic

Authored by phosek on Apr 25 2019, 12:30 PM.

Details

Summary

This change introduces support for building libc++. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Apr 25 2019, 12:30 PM
thakis accepted this revision.Apr 26 2019, 4:51 AM

Nice!

llvm/utils/gn/secondary/libcxx/BUILD.gn
4 ↗(On Diff #196700)

Mention in change description that we (currently -- for libc++ I can see this maybe changing in the future, unlike for other runtime libs) always build libc++ with a just-built clang (and build clang if it hasn't been built yet). Also mention that this currently only is for linux.

llvm/utils/gn/secondary/libcxx/include/BUILD.gn
6 ↗(On Diff #196700)

Add a comment (to make gn args --list output nicer)

32 ↗(On Diff #196700)

absolute path ("//libcxx/utils/cat_files.py")

74 ↗(On Diff #196700)

Should we make the sync script handle files without extensions too?

llvm/utils/gn/secondary/libcxx/src/BUILD.gn
12 ↗(On Diff #196700)

Are both of these enabled by default in cmake? (shared and static, that is)

173 ↗(On Diff #196700)

Probably needs a comment above the list entry to make the sync script happy?

238 ↗(On Diff #196700)

Maybe put configs -= [ thin_archive] right after this, since the two lines belong together conceptually

This revision is now accepted and ready to land.Apr 26 2019, 4:51 AM
phosek updated this revision to Diff 197811.May 2 2019, 9:45 AM
phosek marked 8 inline comments as done.
phosek added inline comments.May 2 2019, 10:25 AM
llvm/utils/gn/secondary/libcxx/include/BUILD.gn
74 ↗(On Diff #196700)

Probably although I'd leave that as a separate change because that might affect other files as well.

llvm/utils/gn/secondary/libcxx/src/BUILD.gn
12 ↗(On Diff #196700)

Yes

This revision was automatically updated to reflect the committed changes.