|
|
|
@ -59,6 +59,8 @@ def _get_external_deps(external_deps): |
|
|
|
|
}) |
|
|
|
|
elif dep == "cronet_c_for_grpc": |
|
|
|
|
ret += ["//third_party/objective_c/Cronet:cronet_c_for_grpc"] |
|
|
|
|
elif dep.startswith("absl/"): |
|
|
|
|
ret += ["@com_google_absl//" + dep] |
|
|
|
|
else: |
|
|
|
|
ret += ["//external:" + dep] |
|
|
|
|
return ret |
|
|
|
@ -86,6 +88,19 @@ def grpc_cc_library( |
|
|
|
|
linkopts = if_not_windows(["-pthread"]) |
|
|
|
|
if use_cfstream: |
|
|
|
|
linkopts = linkopts + if_mac(["-framework CoreFoundation"]) |
|
|
|
|
|
|
|
|
|
# This is a temporary solution to enable absl dependency only for |
|
|
|
|
# Bazel-build with grpc_use_absl enabled to abseilfy in-house classes |
|
|
|
|
# such as inlined_vector before absl is fully supported. |
|
|
|
|
# When https://github.com/grpc/grpc/pull/20184 is merged, it will |
|
|
|
|
# be removed. |
|
|
|
|
more_external_deps = [] |
|
|
|
|
if name == "inlined_vector": |
|
|
|
|
more_external_deps += select({ |
|
|
|
|
"//:grpc_use_absl": ["@com_google_absl//absl/container:inlined_vector"], |
|
|
|
|
"//conditions:default": [], |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
native.cc_library( |
|
|
|
|
name = name, |
|
|
|
|
srcs = srcs, |
|
|
|
@ -101,9 +116,13 @@ def grpc_cc_library( |
|
|
|
|
"//:grpc_allow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=1"], |
|
|
|
|
"//:grpc_disallow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=0"], |
|
|
|
|
"//conditions:default": [], |
|
|
|
|
}) + |
|
|
|
|
select({ |
|
|
|
|
"//:grpc_use_absl": ["GRPC_USE_ABSL=1"], |
|
|
|
|
"//conditions:default": [], |
|
|
|
|
}), |
|
|
|
|
hdrs = hdrs + public_hdrs, |
|
|
|
|
deps = deps + _get_external_deps(external_deps), |
|
|
|
|
deps = deps + _get_external_deps(external_deps) + more_external_deps, |
|
|
|
|
copts = copts, |
|
|
|
|
visibility = visibility, |
|
|
|
|
testonly = testonly, |
|
|
|
|