Skip to content

Commit ed28de7

Browse files
author
donghuixu
committed
add workspace.bzl and bazel.rc
1 parent 39a1c44 commit ed28de7

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

WORKSPACE

+3-19
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
1+
workspace(name = "brpc")
12

2-
http_archive(
3-
name = "com_google_protobuf",
4-
strip_prefix = "protobuf-b04e5cba356212e4e8c66c61bbe0c3a20537c5b9",
5-
url = "https://github.com/google/protobuf/archive/b04e5cba356212e4e8c66c61bbe0c3a20537c5b9.tar.gz",
6-
)
3+
load("//:bazel/workspace.bzl", "brpc_workspace")
74

8-
9-
http_archive(
10-
name = "com_github_gflags_gflags",
11-
strip_prefix = "gflags-46f73f88b18aee341538c0dfc22b1710a6abedef",
12-
url = "https://github.com/gflags/gflags/archive/46f73f88b18aee341538c0dfc22b1710a6abedef.tar.gz",
13-
)
14-
15-
16-
new_http_archive(
17-
name = "com_github_google_leveldb",
18-
build_file = "leveldb.BUILD",
19-
strip_prefix = "leveldb-a53934a3ae1244679f812d998a4f16f2c7f309a6",
20-
url = "https://github.com/google/leveldb/archive/a53934a3ae1244679f812d998a4f16f2c7f309a6.tar.gz"
21-
)
5+
brpc_workspace()
226

bazel/README_bazel_build.md

-2
This file was deleted.

bazel/workspace.bzl

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# brpc external dependencies
2+
3+
def brpc_workspace():
4+
native.http_archive(
5+
name = "com_google_protobuf",
6+
strip_prefix = "protobuf-b04e5cba356212e4e8c66c61bbe0c3a20537c5b9",
7+
url = "https://github.com/google/protobuf/archive/b04e5cba356212e4e8c66c61bbe0c3a20537c5b9.tar.gz",
8+
)
9+
10+
11+
native.http_archive(
12+
name = "com_github_gflags_gflags",
13+
strip_prefix = "gflags-46f73f88b18aee341538c0dfc22b1710a6abedef",
14+
url = "https://github.com/gflags/gflags/archive/46f73f88b18aee341538c0dfc22b1710a6abedef.tar.gz",
15+
)
16+
17+
18+
native.new_http_archive(
19+
name = "com_github_google_leveldb",
20+
build_file = str(Label("//:leveldb.BUILD")),
21+
strip_prefix = "leveldb-a53934a3ae1244679f812d998a4f16f2c7f309a6",
22+
url = "https://github.com/google/leveldb/archive/a53934a3ae1244679f812d998a4f16f2c7f309a6.tar.gz"
23+
)
24+

leveldb.BUILD

-4
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,5 @@ cc_library(
6666
"-DOS_LINUX",
6767
"-DLEVELDB_PLATFORM_POSIX=1",
6868
"-DLEVELDB_ATOMIC_PRESENT",
69-
"-fno-builtin-memcmp",
70-
"-DOS_LINUX",
71-
"-DLEVELDB_PLATFORM_POSIX=1",
72-
"-DLEVELDB_ATOMIC_PRESENT",
7369
],
7470
)

tools/bazel.rc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build --copt -DHAVE_ZLIB=1

0 commit comments

Comments
 (0)