Commit ed28de70 authored by donghuixu's avatar donghuixu

add workspace.bzl and bazel.rc

parent 39a1c44b
workspace(name = "brpc")
http_archive(
name = "com_google_protobuf",
strip_prefix = "protobuf-b04e5cba356212e4e8c66c61bbe0c3a20537c5b9",
url = "https://github.com/google/protobuf/archive/b04e5cba356212e4e8c66c61bbe0c3a20537c5b9.tar.gz",
)
load("//:bazel/workspace.bzl", "brpc_workspace")
http_archive(
name = "com_github_gflags_gflags",
strip_prefix = "gflags-46f73f88b18aee341538c0dfc22b1710a6abedef",
url = "https://github.com/gflags/gflags/archive/46f73f88b18aee341538c0dfc22b1710a6abedef.tar.gz",
)
new_http_archive(
name = "com_github_google_leveldb",
build_file = "leveldb.BUILD",
strip_prefix = "leveldb-a53934a3ae1244679f812d998a4f16f2c7f309a6",
url = "https://github.com/google/leveldb/archive/a53934a3ae1244679f812d998a4f16f2c7f309a6.tar.gz"
)
brpc_workspace()
bazel build --copt -DHAVE_ZLIB=1 ...
# brpc external dependencies
def brpc_workspace():
native.http_archive(
name = "com_google_protobuf",
strip_prefix = "protobuf-b04e5cba356212e4e8c66c61bbe0c3a20537c5b9",
url = "https://github.com/google/protobuf/archive/b04e5cba356212e4e8c66c61bbe0c3a20537c5b9.tar.gz",
)
native.http_archive(
name = "com_github_gflags_gflags",
strip_prefix = "gflags-46f73f88b18aee341538c0dfc22b1710a6abedef",
url = "https://github.com/gflags/gflags/archive/46f73f88b18aee341538c0dfc22b1710a6abedef.tar.gz",
)
native.new_http_archive(
name = "com_github_google_leveldb",
build_file = str(Label("//:leveldb.BUILD")),
strip_prefix = "leveldb-a53934a3ae1244679f812d998a4f16f2c7f309a6",
url = "https://github.com/google/leveldb/archive/a53934a3ae1244679f812d998a4f16f2c7f309a6.tar.gz"
)
......@@ -66,9 +66,5 @@ cc_library(
"-DOS_LINUX",
"-DLEVELDB_PLATFORM_POSIX=1",
"-DLEVELDB_ATOMIC_PRESENT",
"-fno-builtin-memcmp",
"-DOS_LINUX",
"-DLEVELDB_PLATFORM_POSIX=1",
"-DLEVELDB_ATOMIC_PRESENT",
],
)
build --copt -DHAVE_ZLIB=1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment