Trick-17 / clang-build

Clang-based cross platform build system written in Python
https://clang-build.readthedocs.io
MIT License
8 stars 3 forks source link

Automatically correct forwarding of dependencies #96

Closed GPMueller closed 5 years ago

GPMueller commented 5 years ago

The following kind of scenario is not yet handled automatically: executable A -> static lib B -> shared lib C.

The dependency DAG is known to clang-build, so we should be able to forward dependencies without manual specification of interface-libraries or similar things from the user (this is what CMake does...).

When a static or header library depends on a shared library, it is clear that it cannot be linked and has to be forwarded as an interface-library. Therefore:

GPMueller commented 5 years ago

This issue actually doesn't make much sense, as this is essentially already what happens. Flags have to be specified as public or interface if they are to be used accordingly by dependent libraries, but this cannot be avoided in any case.