mirror of https://github.com/grpc/grpc.git
Update Bazel WORKSPACE file and third_party/cares BUILD files to that Bazel can build gRPC as a dependency.
The WORKSPACE file now pulls third_party dependencies directly instead of requiring a git submodule init and update. The git hashes pulled by Bazel are exactly the same as the git submodules checked into third_party. A tiny bit of complexity comes from the c-ares project's use of ares_config.h.cmake and ares_build.c.cmake. The current solution to this problem is to check in a valid ares_config.h and a few valid ares_config.h files. This is the same general approach used still, but ares_config.h and ares_build.h are supplied to cares.BUILD from the only remaining local_repository, which serves only to export these two header files.pull/13060/head
parent
4b8e475642
commit
5d710a5dfe
3 changed files with 167 additions and 109 deletions
@ -0,0 +1,21 @@ |
||||
package( |
||||
default_visibility = ["//visibility:public"], |
||||
) |
||||
|
||||
config_setting( |
||||
name = "darwin", |
||||
values = {"cpu": "darwin"}, |
||||
) |
||||
|
||||
filegroup( |
||||
name = "ares_build_h", |
||||
srcs = ["ares_build.h"], |
||||
) |
||||
|
||||
filegroup( |
||||
name = "ares_config_h", |
||||
srcs = select({ |
||||
":darwin": ["config_darwin/ares_config.h"], |
||||
"//conditions:default": ["config_linux/ares_config.h"], |
||||
}), |
||||
) |
Loading…
Reference in new issue