[libcxx-commits] [PATCH] D120719: [runtimes] Always configure libc++abi before libc++

Chris Bieneman via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 4 12:19:46 PST 2022


beanz added a comment.

In D120719#3360346 <https://reviews.llvm.org/D120719#3360346>, @ldionne wrote:

>   if (TARGET cxxabi_shared)
>     add_library(libcxx-abi-shared ALIAS cxxabi_shared)
>   endif()

`if(TARGET...)` and `ALIAS` targets do require order, but I'm not sure why you need to use those constructs. There is a `TARGET_EXISTS` generator expression that can be used to eliminate many ordering cases, and generator expressions are all late-evaluated. You can query most target properties through generator expressions too.

> I don't really know how to work around that. Also note that I don't want to do
>
>   add_library(libcxx-abi-shared INTERFACE)
>   target_link_libraries(libcxx-abi-shared INTERFACE cxxabi_shared)
>
> or something similar, because I need the original properties of `cxxabi_shared` to be forwarded through (for example I need to be able to get the `TARGET_LINKER_FILE` of `libcxx-abi-shared`).

I don't fully get the context here of what you're trying to do, but this is very much possible with generator expressions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120719/new/

https://reviews.llvm.org/D120719



More information about the libcxx-commits mailing list