From 8e677f7e38e94a1672ec9ef6ab2c9673e6033d8b Mon Sep 17 00:00:00 2001 From: Mike Schore Date: Mon, 17 Jun 2019 21:44:32 -0700 Subject: [PATCH] build: patch Abseil to bring in line with upstream (#138) Signed-off-by: Mike Schore Signed-off-by: JP Simard --- mobile/WORKSPACE | 15 +++++++++------ mobile/bazel/abseil.patch | 11 +++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 mobile/bazel/abseil.patch diff --git a/mobile/WORKSPACE b/mobile/WORKSPACE index 89e1f63517f5..85c7cd4ac76a 100644 --- a/mobile/WORKSPACE +++ b/mobile/WORKSPACE @@ -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", diff --git a/mobile/bazel/abseil.patch b/mobile/bazel/abseil.patch new file mode 100644 index 000000000000..67cdf5953799 --- /dev/null +++ b/mobile/bazel/abseil.patch @@ -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",