Update by review

pull/20918/head
Esun Kim 5 years ago
parent 1e74c102cd
commit 4e396883d4
  1. 22
      bazel/grpc_build_system.bzl
  2. 7
      src/core/lib/gprpp/inlined_vector.h
  3. 3
      tools/internal_ci/linux/grpc_bazel_build_in_docker.sh

@ -88,11 +88,19 @@ def grpc_cc_library(
linkopts = if_not_windows(["-pthread"])
if use_cfstream:
linkopts = linkopts + if_mac(["-framework CoreFoundation"])
# Temporary hack for GRPC_USE_ABSL {
# 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 += ["absl/container:inlined_vector"]
# Temporary hack for GRPC_USE_ABSL }
more_external_deps += select({
"//:grpc_use_absl": ["@com_google_absl//absl/container:inlined_vector"],
"//conditions:default": [],
})
native.cc_library(
name = name,
srcs = srcs,
@ -109,12 +117,12 @@ def grpc_cc_library(
"//:grpc_disallow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=0"],
"//conditions:default": [],
}) +
select({
"//:grpc_use_absl": ["GRPC_USE_ABSL=1"],
"//conditions:default": [],
select({
"//:grpc_use_absl": ["GRPC_USE_ABSL=1"],
"//conditions:default": [],
}),
hdrs = hdrs + public_hdrs,
deps = deps + _get_external_deps(external_deps + more_external_deps),
deps = deps + _get_external_deps(external_deps) + more_external_deps,
copts = copts,
visibility = visibility,
testonly = testonly,

@ -233,14 +233,7 @@ class InlinedVector {
}
}
#if 1
typename std::aligned_storage<sizeof(T)>::type inline_[N];
#else
// Alignment attribute should be used like this but it has a problem
// with current gRPC source. It has to be disabled until other gRPC part
// goes well with this.
typename std::aligned_storage<sizeof(T), alignof(T)>::type inline_[N];
#endif
T* dynamic_;
size_t size_;
size_t capacity_;

@ -25,4 +25,7 @@ git clone /var/local/jenkins/grpc /var/local/git/grpc
${name}')
cd /var/local/git/grpc
bazel build --spawn_strategy=standalone --genrule_strategy=standalone :all test/... examples/...
# This is a temporary build test before full absl support is done
# with https://github.com/grpc/grpc/pull/20918.
bazel build --spawn_strategy=standalone --genrule_strategy=standalone --define=GRPC_USE_ABSL=1 :grpc

Loading…
Cancel
Save