[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-15 Thread Wink Saville via Phabricator via cfe-commits
winksaville abandoned this revision. winksaville added a comment. Abandoning, @beanz has proposed a better solution, D61909 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61804/new/ https://reviews.llvm.org/D61804

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-15 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. IMHO "`BUILD_CLANG_DYLIB`" is needed. As you have it now libclang_shared.so is always builds on UNIX systems, which I believe means that all linux distros would have both increasing their sizes. I think the default should be "always" `build libclang*.a` as it is

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-15 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D61909#1503483 , @beanz wrote: > In D61909#1503433 , @winksaville > wrote: > > > IMHO "`BUILD_CLANG_DYLIB`" is needed. As you have it now libclang_shared.so > > is always builds on

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-16 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. > Distributions only get libclang_shared if they run the `install` target which > installs all of LLVM & Clang. The point of `LLVM_DISTRIBUTION_COMPONENTS` is > to allow people constructing distributions to choose which pieces they want > to install without

[PATCH] D62279: Use LTO capable linker

2019-05-24 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. So this compiles and as such improves on what we currently have and as such I think it should be merged, although there maybe other solutions. It still fails `ninja stage2-check-all` with the gtest problem which @beanz is working on resolving. Repository: rG

[PATCH] D62215: Fixes to distribution example for X86_64 Arch Linux

2019-05-25 Thread Wink Saville via Phabricator via cfe-commits
winksaville abandoned this revision. winksaville added a comment. Rather than creating LLVMgold.so as this change does, @beanz suggested we use a known LTO capable linker, `lld`. See D62279 .. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-10 Thread Wink Saville via Phabricator via cfe-commits
winksaville created this revision. winksaville added reviewers: tstellar, morehouse, gottesmm, chapuni. Herald added subscribers: llvm-commits, cfe-commits, mgorny. Herald added projects: clang, LLVM. I ran into the need for both while trying to compile zig (https://ziglang.org) on my Arch Linux

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-13 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. > Arch Linux is in an unsupported state, and your patch isn't the way forward. OK, I'll filed a bug, https://bugs.archlinux.org/task/62624 > Let's rewind. > > Why do "some people like shared libraries"? There are usually two reasons > people cite for linking

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-13 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D61804#1500409 , @beanz wrote: > My change should not have decreased build time from trunk, nor should it have > reduced the number of build steps. That patch should generate > lib/libClang_shared.so, which will export

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-13 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D61804#1500445 , @winksaville wrote: > In D61804#1500409 , @beanz wrote: > > > My change should not have decreased build time from trunk, nor should it > > have reduced the number

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-14 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. You mention that you're using OBJECT libraries so objects aren't built mutliples times and in my current tests the number of steps increased by only 3, it went from 4353 to 4356, when using this patch, which is great! What I see in my testing of the patch is that

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-13 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. @beanz I found what I think is the reason libclang_shared.so isn't being created. I added a bunch of debug output using `message` to add_llvm_subdirectory: 1041 function(add_llvm_subdirectory project type name) 1042message(STATUS "add_llvm_subdirectory

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-14 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. I did some quick testing. I used cmake and ninja to build `llvm` and enabled `clang;lld;compiler-rt` subprojects: $ cd build-beanz-clang-shlib-2-add-debug-BUILD-LINK_DYNLIB-ON $ cmake ../llvm -G Ninja '-DLLVM_ENABLE_PROJECTS=clang;lld;compiler-rt'

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-14 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. I did some quick testing. I used cmake and ninja to build `llvm` and enabled `clang;lld;compiler-rt` subprojects: $ cd build-beanz-clang-shlib-2-add-debug-BUILD-LINK_DYNLIB-ON $ cmake ../llvm -G Ninja '-DLLVM_ENABLE_PROJECTS=clang;lld;compiler-rt'

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-14 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. Questions: - Should we only build `libclang_shared.so` if `LLVM_BUILD_LLVM_DYLIB` is ON? - Should we use link clang-9 to libclang_shared.so when `LLVM_LINK_LLVM_DYLIB` is ON? - Or maybe we should define `BUILD_CLANG_DYLIB` and `LINK_CLANG_DYLIB` or ... ?

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-14 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. Questions: - Should we only build `libclang_shared.so` if `LLVM_BUILD_LLVM_DYLIB` is ON? - Should we use link clang-9 to libclang_shared.so when `LLVM_LINK_LLVM_DYLIB` is ON? - Or maybe we should define `BUILD_CLANG_DYLIB` and `LINK_CLANG_DYLIB` or ... ?

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-14 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. Sorry, the two previous comments were meant for D61909 and I've moved them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61804/new/ https://reviews.llvm.org/D61804

[PATCH] D62215: Fixes to distribution example for X86_64 Arch Linux

2019-05-22 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D62215#1510933 , @beanz wrote: > Adding "libcxxabi" to `LLVM_ENABLE_RUNTIMES` is fine, but the other changes > to the DistributionExample are only needed because you chose to use gold, > which is a configuration-specific

[PATCH] D62215: Fixes to distribution example for X86_64 Arch Linux

2019-05-22 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. > I actually really appreciate you trying this out and reporting back with such > detailed feedback on your experience. Thank you for your patience, and I'm > sorry if I'm being a bit of a pain. Been a good learning experince for me, both LLVM and cmake, I hope you

[PATCH] D62279: Use LTO capable linker

2019-05-22 Thread Wink Saville via Phabricator via cfe-commits
winksaville abandoned this revision. winksaville added a comment. Chris, I thought you had added libcxxabi in LLVM_ENABLE_RUNTIMES, but you hadn't so abandoning and trying again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62279/new/

[PATCH] D62279: Use LTO capable linker

2019-05-22 Thread Wink Saville via Phabricator via cfe-commits
winksaville created this revision. winksaville added a reviewer: beanz. Herald added subscribers: cfe-commits, dexonsmith, inglorion, mehdi_amini, mgorny. Herald added a project: clang. In DistributionExample.cmake be sure we use a LTO capable linker, the easiest to choose is lld. Repository:

[PATCH] D62279: Use LTO capable linker

2019-05-23 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. Adding libcxxabi worked and `ninja stage2-distribution` succeeded but I then ran `ninja check-all` and from within stage2-bins/ but that failed: [1072/1526] cd

[PATCH] D62279: Use LTO capable linker

2019-05-23 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. > Are you still having that issue after rL361436 > ? That should have resolved that problem. > The issue isn't that gtest is missing from the bootstrap, but rather that it > was missing from the dependencies for the runtime

[PATCH] D62279: Use LTO capable linker

2019-05-23 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D62279#1514596 , @beanz wrote: > @winksaville I've figured out how to resolve the `gtest` issue, but > unfortunately that isn't good enough to get the `check-runtimes` target > working. A change went in back in February

[PATCH] D62279: Use LTO capable linker

2019-05-24 Thread Wink Saville via Phabricator via cfe-commits
winksaville updated this revision to Diff 201288. winksaville added a comment. Added libcxxabi and rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62279/new/ https://reviews.llvm.org/D62279 Files:

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-16 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. Just to be clear, I have nothing to do with any distribution except as a user (Arch Linux) so please take what I say and request with a huge grain of salt. As mentioned I have filed a bug against the clang package in Arch

[PATCH] D62215: Fixes to distribution example for X86_64 Arch Linux

2019-05-21 Thread Wink Saville via Phabricator via cfe-commits
winksaville created this revision. winksaville added a reviewer: beanz. Herald added subscribers: llvm-commits, cfe-commits, mgorny. Herald added projects: clang, LLVM. Add runtime libcxxabi, use gold linker and create LLVMgold.so. Tested with on monorepo with: mkdir build && cd build && \

[PATCH] D62215: Fixes to distribution example for X86_64 Arch Linux

2019-05-21 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. This may not "correct" but I had to do these to get `ninja stage2-distribution` to complete on my computer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62215/new/ https://reviews.llvm.org/D62215

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-16 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D61909#1505046 , @beanz wrote: > There is a simpler example distribution configuration, but sadly there isn't > documentation. That is something I can fix. Please add documentation if you want people to use it :) In the

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D61804#1499259 , @beanz wrote: > I question the general utility of this patch, and I don't really think this > does anything we want the build system doing. When you say you don't think the build system should do this,

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Wink Saville via Phabricator via cfe-commits
winksaville marked an inline comment as done. winksaville added a comment. In D61804#1499267 , @beanz wrote: > As an additional note, Arch linux should not be building clang with > `BUILD_SHARED_LIBS` nor should it be distributing those ,so files. That

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Wink Saville via Phabricator via cfe-commits
winksaville updated this revision to Diff 199172. winksaville added a comment. Change default to be CLANG_ENABLE_STATIC_LIBRARIES=ON CLANG_ENABLE_SHARED_LIBRARIeS=OFF Suggested by @beanz Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61804/new/