Skip to content

Commit

Permalink
build: patch Abseil to bring in line with upstream (#138)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Schore <mike.schore@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
  • Loading branch information
goaway authored and jpsim committed Nov 28, 2022
1 parent 4f3ab7c commit 8e677f7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
15 changes: 9 additions & 6 deletions mobile/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@ http_archive(
urls = ["https://github.com/bazelbuild/rules_foreign_cc/archive/2b40a0098d4016f620c2ee4c10da0f46f5c90d57.tar.gz"],
)

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

# Patch upstream Abseil to prevent Foundation dependency from leaking into Android builds.
# Workaround for https://github.com/abseil/abseil-cpp/issues/326.
# Should be removed in https://github.com/lyft/envoy-mobile/issues/136 once resolved.
# TODO: Should be removed in https://github.com/lyft/envoy-mobile/issues/136 once rules_android
# supports platform toolchains.
http_archive(
name = "com_google_absl",
sha256 = "e35082e88b9da04f4d68094c05ba112502a5063712f3021adfa465306d238c76",
strip_prefix = "abseil-cpp-cc8dcd307b76a575d2e3e0958a4fe4c7193c2f68",
urls = ["https://github.com/abseil/abseil-cpp/archive/cc8dcd307b76a575d2e3e0958a4fe4c7193c2f68.tar.gz"],
patches = ["//bazel:abseil.patch"],
sha256 = "7ddf863ddced6fa5bf7304103f9c7aa619c20a2fcf84475512c8d3834b9d14fa",
strip_prefix = "abseil-cpp-61c9bf3e3e1c28a4aa6d7f1be4b37fd473bb5529",
urls = ["https://github.com/abseil/abseil-cpp/archive/61c9bf3e3e1c28a4aa6d7f1be4b37fd473bb5529.tar.gz"],
)

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

local_repository(
name = "envoy",
path = "envoy",
Expand Down
11 changes: 11 additions & 0 deletions mobile/bazel/abseil.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- absl/time/internal/cctz/BUILD.bazel
+++ absl/time/internal/cctz/BUILD.bazel
@@ -78,7 +78,7 @@ cc_library(
],
linkopts = select({
":osx": [
- "-framework Foundation",
+ # "-framework Foundation",
],
":ios": [
"-framework Foundation",

0 comments on commit 8e677f7

Please sign in to comment.