[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-22 Thread Petr Hosek via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL337668: [CMake] Support statically linking dependencies only to shared or static library (authored by phosek, committed by

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-20 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. LGTM Repository: rL LLVM https://reviews.llvm.org/D49502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI)) ---

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 156416. phosek marked 8 inline comments as done. Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49502 Files: libcxx/CMakeLists.txt libcxx/cmake/Modules/HandleLibCXXABI.cmake libcxx/lib/CMakeLists.txt libcxxabi

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI)) --

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI)) ---

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-19 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI)) --

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/lib/CMakeLists.txt:269 +AND (TARGET cxxabi_static OR HAVE_LIBCXXABI)) +#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR +#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI)) ---

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 156201. phosek marked 2 inline comments as done. Repository: rCXX libc++ https://reviews.llvm.org/D49502 Files: libcxx/CMakeLists.txt libcxx/cmake/Modules/HandleLibCXXABI.cmake libcxx/lib/CMakeLists.txt libcxxabi/CMakeLists.txt libcxxabi/src/CMake

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: libcxx/CMakeLists.txt:158 +cmake_dependent_option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY_STATIC + "Statically link the ABI library to static library" ON phosek wrote: > Maybe `LIBCXX_ENABLE_STATIC_ABI_LIBRARY_IN_STATIC_LIBR

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/CMakeLists.txt:158 +cmake_dependent_option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY_STATIC + "Statically link the ABI library to static library" ON Maybe `LIBCXX_ENABLE_STATIC_ABI_LIBRARY_IN_STATIC_LIBRARY` would be mor

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This came up in Fuchsia. Clang driver, add `-lc++` as a dependency. This is sufficient for shared libc++, but for static user has to manually pass `-lc++abi -lunwind`, so for static libc++ we would actually like to combine both libc++abi and libunwind into a single archi

[PATCH] D49502: [CMake] Support statically linking dependencies only to shared or static library

2018-07-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: EricWF. Herald added subscribers: cfe-commits, ldionne, christof, mgorny. Currently it's possible to select whether to statically link unwinder or the C++ ABI library, but this option applies to both the shared and static library. However, in