Hi all, I want to generate a so library use below workround, and I found that use just deps will not work?
cc_binary(
name = "libhello-time.so",
srcs = [
"hello-time.h",
"hello-time.cc"
],
linkshared = True,
linkstatic = True,
visibility = ["//main:__pkg__"],
)
it will generate a "libhello-time.so" and work well, but if I use just deps, but not srcs
cc_library(
name = "hello-time-p",
srcs = ["hello-time.cc"],
hdrs = ["hello-time.h"],
visibility = ["//main:__pkg__"],
)
cc_binary(
name = "libhello-time.so",
linkshared = True,
linkstatic = True,
deps = [":hello-time-p"], #just deps
)
it will generate "libhello-time.so", but "libhello-time.so" seems empty, below is the "nm libhello-time.so" output of "libhello-time.so"
U dyld_stub_binder
My question is, how do I generate the so library file, include other libraries through deps, or I can only generate the so library through srcs