Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some compile problem #47

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0.0
31 changes: 21 additions & 10 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
load("@rules_foreign_cc//tools/build_defs:configure.bzl", "configure_make")
# load("@rules_foreign_cc//tools/build_defs:make.bzl", "make")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")

configure_make(
package(default_visibility = ["//visibility:public"])

cmake(
name = "libevent",
visibility = ["//visibility:public"],
configure_options = [
"--enable-shared=no",
"--disable-libevent-regress",
"--disable-openssl",
],
cache_entries = {
"EVENT__DISABLE_MBEDTLS": "ON",
"EVENT__DISABLE_OPENSSL": "on",
"EVENT__DISABLE_REGRESS": "on",
"EVENT__DISABLE_TESTS": "on",
"EVENT__LIBRARY_TYPE": "STATIC",
"CMAKE_BUILD_TYPE": "Release",
# Disable ranlib because it is not handled by bazel, and therefore
# doesn't respect custom toolchains such as the Android NDK,
# see https://github.com/bazelbuild/rules_foreign_cc/issues/252
"CMAKE_RANLIB": "",
},
generate_args = ["-DCMAKE_C_FLAGS=-fPIC -GNinja"],
lib_source = "@com_github_libevent//:all",
out_lib_dir = "lib",
out_static_libs = [
"libevent.a",
"libevent_pthreads.a",
]
)

# make(
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Rule repository
http_archive(
name = "rules_foreign_cc",
strip_prefix = "rules_foreign_cc-master",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/master.zip",
strip_prefix = "rules_foreign_cc-0.7.1",
urls = ["https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.7.1.zip"],
)

load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")

rules_foreign_cc_dependencies()

Expand Down
4 changes: 2 additions & 2 deletions bazel/third_party_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ def include_third_party_repositories():
http_archive(
name = "com_github_libevent",
build_file_content = all_content,
strip_prefix = "libevent-2.1.8-stable",
urls = ["https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz"],
strip_prefix = "libevent-0d7d85c2083f7a4c9efe01c061486f332b576d28",
urls = ["https://github.com/libevent/libevent/archive/0d7d85c2083f7a4c9efe01c061486f332b576d28.tar.gz"],
)

http_archive(
Expand Down
2 changes: 1 addition & 1 deletion sentinel-core/log/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cc_test(
cc_test(
name = "logger_unittests",
srcs = [
"logger_unittests.cc",
"logger_test.cc",
],
copts = TEST_COPTS,
deps = [
Expand Down
2 changes: 1 addition & 1 deletion sentinel-core/property/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cc_library(
cc_test(
name = "dynamic_sentinel_property_unittests",
srcs = [
"dynamic_sentinel_property_unittests.cc",
"dynamic_sentinel_property_test.cc",
],
copts = TEST_COPTS,
deps = [
Expand Down
2 changes: 1 addition & 1 deletion sentinel-core/slot/base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ cc_library(
cc_test(
name = "default_slot_chain_impl_unittests",
srcs = [
"default_slot_chain_impl_unittests.cc",
"default_slot_chain_impl_test.cc",
],
copts = TEST_COPTS,
deps = [
Expand Down
2 changes: 1 addition & 1 deletion sentinel-core/transport/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cc_library(
cc_test(
name = "event_loop_thread_unittests",
srcs = [
"event_loop_thread.cc",
"event_loop_thread_test.cc",
],
copts = TEST_COPTS,
deps = [
Expand Down
Loading