Skip to content

Commit

Permalink
Revert "Update rules_foreign_cc to version 0.2.0."
Browse files Browse the repository at this point in the history
Summary:
This reverts commit 9ea1aa7.

Breaks BCC.

Test Plan: n/a

Reviewers: jamesbartlett, oazizi, #third_party_approvers, vihang

Reviewed By: jamesbartlett, #third_party_approvers, vihang

Differential Revision: https://phab.corp.pixielabs.ai/D8084

GitOrigin-RevId: 0a8a283
  • Loading branch information
zasgar committed Apr 9, 2021
1 parent 511596f commit 6776964
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")

grpc_extra_deps()

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

rules_foreign_cc_dependencies()

Expand Down
8 changes: 5 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://github.com/AriaFallah/csv-parser/archive/e3c1207f4de50603a4946dc5daa0633ce31a9257.tar.gz"],
),
rules_foreign_cc = dict(
sha256 = "d54742ffbdc6924f222d2179f0e10e911c5c659c4ae74158e9fe827aad862ac6",
strip_prefix = "rules_foreign_cc-0.2.0",
urls = ["https://github.com/bazelbuild/rules_foreign_cc/archive/0.2.0.tar.gz"],
sha256 = "3411b754d3f7a91356c27a93b6a250a6fa22999858b6d118e928c57e1888acf9",
strip_prefix = "rules_foreign_cc-e6ca4d2cd12be03ccda117b26d59a03de7481dc3",
# 2019-11-01
urls = ["https://github.com/bazelbuild/rules_foreign_cc/" +
"archive/e6ca4d2cd12be03ccda117b26d59a03de7481dc3.tar.gz"],
),
com_github_gperftools_gperftools = dict(
sha256 = "18574813a062eee487bc1b761e8024a346075a7cb93da19607af362dc09565ef",
Expand Down
20 changes: 11 additions & 9 deletions third_party/foreign_cc/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make", "cmake", "make")
load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external")
load("@rules_foreign_cc//tools/build_defs:configure.bzl", "configure_make")
load("@rules_foreign_cc//tools/build_defs:make.bzl", "make")

licenses(["notice"])

Expand All @@ -15,7 +17,7 @@ configure_make(
lib_source = "@com_github_gperftools_gperftools//:all",
linkopts = ["-lpthread"],
make_commands = ["make install-libLTLIBRARIES install-perftoolsincludeHEADERS"],
out_static_libs = select({
static_libraries = select({
"//bazel:debug_tcmalloc": ["libtcmalloc_debug.a"],
"//conditions:default": ["libtcmalloc_and_profiler.a"],
}),
Expand All @@ -29,7 +31,7 @@ cc_library(
],
)

cmake(
cmake_external(
name = "natsc",
cache_entries = {
# This forces nats to link against boringssl instead of openssl.
Expand All @@ -48,7 +50,7 @@ cmake(
deps = ["@boringssl//:ssl"],
)

cmake(
cmake_external(
name = "libuv",
cache_entries = {
"BUILDING_UV_SHARED": "OFF",
Expand All @@ -64,7 +66,7 @@ cmake(
],
)

cmake(
cmake_external(
name = "libarchive",
cache_entries = {
"ENABLE_CAT": "OFF",
Expand All @@ -91,12 +93,12 @@ make(
# make_commands = ["BUILD_STATIC_ONLY=y make -C src install PREFIX=out"],
# out_include_dir = "out/include",
# out_lib_dir = "out/lib64",
out_static_libs = [
static_libraries = [
"libbpf.a",
],
)

cmake(
cmake_external(
name = "bcc",
generate_crosstool_file = True,
lib_name = "libbcc_static",
Expand All @@ -107,9 +109,9 @@ cmake(
"-lelf",
],
make_commands = [
"make -j$(nproc) -C src/cc install",
"make -j ${nproc} -C src/cc install",
],
out_static_libs = [
static_libraries = [
"libapi-static.a",
"libbcc.a",
"libbcc_bpf.a",
Expand Down

0 comments on commit 6776964

Please sign in to comment.