[libcxx-commits] [PATCH] D60166: [libc++abi] Refactor CMake build to avoid object libraries
Shoaib Meenai via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 2 17:42:11 PDT 2019
smeenai requested changes to this revision.
smeenai added inline comments.
This revision now requires changes to proceed.
================
Comment at: libcxxabi/src/CMakeLists.txt:206
+ if(LIBUNWIND_HERMETIC_STATIC_LIBRARY)
+ target_sources(cxxabi_static PRIVATE $<TARGET_OBJECTS:unwind_static_objects>)
+ else()
----------------
ldionne wrote:
> smeenai wrote:
> > Will you want to do something similar with libunwind (where it's not build as an object library anymore), at which point this logic will change too?
> If we don't build object libraries for libunwind, then this would change to `$<TARGET_OBJECTS:unwind_static>` and `$<TARGET_OBJECTS:unwind>` respectively, IIUC.
`$<TARGET_OBJECTS:...>` only works with object libraries (https://cmake.org/cmake/help/v3.4/manual/cmake-generator-expressions.7.html), so it'd need a bit more tweaking, but yeah, that's kinda independent of this patch :)
I did realize a problem with this though. In our minimum supported CMake version (3.4.3), you can only use TARGET_SOURCES inside the sources list of `add_library` and `add_executable`. Later versions lift this restriction, but we need to adhere to it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60166/new/
https://reviews.llvm.org/D60166
More information about the libcxx-commits
mailing list