`cc_binary` and `cc_library` cannot link dependencies of dependendency
Created by: reyoung
The demo code is here.
The issues are
-
lib_b
depends on lib_a. - if a binary only depends on
lib_b
, that binary cannot linklib_a
implicitly. We must declare the lib_a is also a dependency of that binary.
Should we make cc_binary
and cc_library
can lik the dependencies of dependency or not?
I think it is a little bit complex to implement this feature. Because it should handle diamond dependence
problem and circle dependence
problem
But if we do not implement this feature, the final binary of paddle should be very complex to write. Like
cc_binary(final_bin SRC final_bin_main.cc DEPS A B C D E ....) // a lot deps.