Merge pull request #21583 from guantaol/libuv_deps

Add a new submodule libuv v1.34.0
pull/21642/head
Guantao Liu 5 years ago committed by GitHub
commit 1326593d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .gitmodules
  2. 14
      bazel/grpc_deps.bzl
  3. 1
      third_party/BUILD
  4. 1
      third_party/libuv
  5. 199
      third_party/libuv.BUILD
  6. 1
      tools/run_tests/sanity/check_bazel_workspace.py
  7. 1
      tools/run_tests/sanity/check_submodules.sh

3
.gitmodules vendored

@ -46,3 +46,6 @@
[submodule "third_party/udpa"]
path = third_party/udpa
url = https://github.com/cncf/udpa.git
[submodule "third_party/libuv"]
path = third_party/libuv
url = https://github.com/libuv/libuv.git

@ -121,6 +121,11 @@ def grpc_deps():
actual = "@io_opencensus_cpp//opencensus/tags:tags",
)
native.bind(
name = "libuv",
actual = "@libuv//:libuv",
)
if "boringssl" not in native.existing_rules():
http_archive(
name = "boringssl",
@ -263,6 +268,15 @@ def grpc_deps():
sha256 = "122ebf7fe7d1c8e938af6aeaee0efe788a3a2449ece5a8d6a428cb18d6f88033",
)
if "libuv" not in native.existing_rules():
http_archive(
name = "libuv",
build_file = "@com_github_grpc_grpc//third_party:libuv.BUILD",
sha256 = "dfb4fe1ff0b47340978490a14bf253475159ecfcbad46ab2a350c78f9ce3360f",
strip_prefix = "libuv-15ae750151ac9341e5945eb38f8982d59fb99201",
url = "https://github.com/libuv/libuv/archive/15ae750151ac9341e5945eb38f8982d59fb99201.tar.gz",
)
grpc_python_deps()
# TODO: move some dependencies from "grpc_deps" here?

1
third_party/BUILD vendored

@ -10,4 +10,5 @@ exports_files([
"six.BUILD",
"enum34.BUILD",
"futures.BUILD",
"libuv.BUILD",
])

1
third_party/libuv vendored

@ -0,0 +1 @@
Subproject commit 15ae750151ac9341e5945eb38f8982d59fb99201

@ -0,0 +1,199 @@
COMMON_LIBUV_HEADERS = [
"include/uv.h",
"include/uv/errno.h",
"include/uv/threadpool.h",
"include/uv/version.h",
"include/uv/tree.h",
]
UNIX_LIBUV_HEADERS = [
"include/uv/unix.h",
"src/unix/atomic-ops.h",
"src/unix/internal.h",
"src/unix/spinlock.h",
]
LINUX_LIBUV_HEADERS = [
"include/uv/linux.h",
"src/unix/linux-syscalls.h",
]
ANDROID_LIBUV_HEADERS = [
"include/uv/android-ifaddrs.h",
]
DARWIN_LIBUV_HEADERS = [
"include/uv/darwin.h",
]
WINDOWS_LIBUV_HEADERS = [
"include/uv/win.h",
"src/win/atomicops-inl.h",
"src/win/handle-inl.h",
"src/win/internal.h",
"src/win/req-inl.h",
"src/win/stream-inl.h",
"src/win/winapi.h",
"src/win/winsock.h",
]
COMMON_LIBUV_SOURCES = [
"src/fs-poll.c",
"src/heap-inl.h",
"src/idna.c",
"src/idna.h",
"src/inet.c",
"src/queue.h",
"src/strscpy.c",
"src/strscpy.h",
"src/threadpool.c",
"src/timer.c",
"src/uv-data-getter-setters.c",
"src/uv-common.c",
"src/uv-common.h",
"src/version.c",
]
UNIX_LIBUV_SOURCES = [
"src/unix/async.c",
"src/unix/atomic-ops.h",
"src/unix/core.c",
"src/unix/dl.c",
"src/unix/fs.c",
"src/unix/getaddrinfo.c",
"src/unix/getnameinfo.c",
"src/unix/internal.h",
"src/unix/loop.c",
"src/unix/loop-watcher.c",
"src/unix/pipe.c",
"src/unix/poll.c",
"src/unix/process.c",
"src/unix/signal.c",
"src/unix/spinlock.h",
"src/unix/stream.c",
"src/unix/tcp.c",
"src/unix/thread.c",
"src/unix/tty.c",
"src/unix/udp.c",
]
LINUX_LIBUV_SOURCES = [
"src/unix/linux-core.c",
"src/unix/linux-inotify.c",
"src/unix/linux-syscalls.c",
"src/unix/linux-syscalls.h",
"src/unix/procfs-exepath.c",
"src/unix/proctitle.c",
"src/unix/sysinfo-loadavg.c",
"src/unix/sysinfo-memory.c",
]
ANDROID_LIBUV_SOURCES = [
"src/unix/android-ifaddrs.c",
"src/unix/pthread-fixes.c",
]
DARWIN_LIBUV_SOURCES = [
"src/unix/bsd-ifaddrs.c",
"src/unix/darwin.c",
"src/unix/fsevents.c",
"src/unix/kqueue.c",
"src/unix/darwin-proctitle.c",
"src/unix/proctitle.c",
]
WINDOWS_LIBUV_SOURCES = [
"src/win/async.c",
"src/win/atomicops-inl.h",
"src/win/core.c",
"src/win/detect-wakeup.c",
"src/win/dl.c",
"src/win/error.c",
"src/win/fs-event.c",
"src/win/fs.c",
"src/win/getaddrinfo.c",
"src/win/getnameinfo.c",
"src/win/handle.c",
"src/win/handle-inl.h",
"src/win/internal.h",
"src/win/loop-watcher.c",
"src/win/pipe.c",
"src/win/poll.c",
"src/win/process-stdio.c",
"src/win/process.c",
"src/win/req-inl.h",
"src/win/signal.c",
"src/win/stream.c",
"src/win/stream-inl.h",
"src/win/tcp.c",
"src/win/thread.c",
"src/win/tty.c",
"src/win/udp.c",
"src/win/util.c",
"src/win/winapi.c",
"src/win/winapi.h",
"src/win/winsock.c",
"src/win/winsock.h",
]
cc_library(
name = "libuv",
srcs = select({
"//tools/cc_target_os:android": COMMON_LIBUV_SOURCES + UNIX_LIBUV_SOURCES + LINUX_LIBUV_SOURCES + ANDROID_LIBUV_SOURCES,
"//tools/cc_target_os:apple": COMMON_LIBUV_SOURCES + UNIX_LIBUV_SOURCES + DARWIN_LIBUV_SOURCES,
"//tools/cc_target_os:windows": COMMON_LIBUV_SOURCES + WINDOWS_LIBUV_SOURCES,
"//conditions:default": COMMON_LIBUV_SOURCES + UNIX_LIBUV_SOURCES + LINUX_LIBUV_SOURCES,
}),
hdrs = [
"include/uv.h",
] + select({
"//tools/cc_target_os:android": COMMON_LIBUV_HEADERS + UNIX_LIBUV_HEADERS + LINUX_LIBUV_HEADERS + ANDROID_LIBUV_HEADERS,
"//tools/cc_target_os:apple": COMMON_LIBUV_HEADERS + UNIX_LIBUV_HEADERS + DARWIN_LIBUV_HEADERS,
"//tools/cc_target_os:windows": COMMON_LIBUV_HEADERS + WINDOWS_LIBUV_HEADERS,
"//conditions:default": COMMON_LIBUV_HEADERS + UNIX_LIBUV_HEADERS + LINUX_LIBUV_HEADERS,
}),
copts = [
"-D_LARGEFILE_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_GNU_SOURCE",
"-pthread",
"--std=gnu89",
"-pedantic",
"-Wno-error",
"-Wno-strict-aliasing",
"-Wstrict-aliasing",
"-O2",
"-Wno-implicit-function-declaration",
"-Wno-unused-function",
"-Wno-unused-variable",
] + select({
"//tools/cc_target_os:apple": [],
"//tools/cc_target_os:windows": [
"-DWIN32_LEAN_AND_MEAN",
"-D_WIN32_WINNT=0x0600",
],
"//conditions:default": [
"-Wno-tree-vrp",
"-Wno-omit-frame-pointer",
"-D_DARWIN_USE_64_BIT_INODE=1",
"-D_DARWIN_UNLIMITED_SELECT=1",
],
}),
includes = [
"include",
"src",
],
linkopts = select({
"//tools/cc_target_os:windows": [
"-Xcrosstool-compilation-mode=$(COMPILATION_MODE)",
"-Wl,Iphlpapi.lib",
"-Wl,Psapi.lib",
"-Wl,User32.lib",
"-Wl,Userenv.lib",
],
"//conditions:default": [],
}),
visibility = [
"//visibility:public",
],
)

@ -64,6 +64,7 @@ _GRPC_DEP_NAMES = [
'io_bazel_rules_go',
'build_bazel_rules_apple',
'build_bazel_apple_support',
'libuv',
]
_GRPC_BAZEL_ONLY_DEPS = [

@ -36,6 +36,7 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules"
28f50e0fed19872e0fd50dd23ce2ee8cd759338e third_party/gflags (v2.2.0-5-g30dbc81)
80ed4d0bbf65d57cc267dfc63bd2584557f11f9b third_party/googleapis (common-protos-1_3_1-915-g80ed4d0bb)
c9ccac7cb7345901884aabf5d1a786cfa6e2f397 third_party/googletest (6e2f397)
15ae750151ac9341e5945eb38f8982d59fb99201 third_party/libuv (v1.34.0)
09745575a923640154bcf307fba8aedff47f240a third_party/protobuf (v3.7.0-rc.2-247-g09745575)
e143189bf6f37b3957fb31743df6a1bcf4a8c685 third_party/protoc-gen-validate (v0.0.10)
94324803a497c8f76dbc78df393ef629d3a9f3c3 third_party/udpa (heads/master)

Loading…
Cancel
Save