Last active
June 9, 2022 21:50
-
-
Save oschaaf/7bbccfcc00591adda54d79836fa6d86a to your computer and use it in GitHub Desktop.
conditionally patch v8 repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl | |
index 8a7999b03e..2fac858114 100644 | |
--- a/bazel/repositories.bzl | |
+++ b/bazel/repositories.bzl | |
@@ -210,6 +210,7 @@ def envoy_dependencies(skip_targets = []): | |
_com_github_curl() | |
_com_github_envoyproxy_sqlparser() | |
_com_googlesource_chromium_v8() | |
+ _com_googlesource_chromium_v8_ppc() | |
_com_github_google_quiche() | |
_com_googlesource_googleurl() | |
_com_lightstep_tracer_cpp() | |
@@ -822,6 +823,22 @@ cc_library(name = "curl", visibility = ["//visibility:public"], deps = ["@envoy/ | |
actual = "@envoy//bazel/foreign_cc:curl", | |
) | |
+def _com_googlesource_chromium_v8_ppc(): | |
+ external_genrule_repository( | |
+ name = "com_googlesource_chromium_v8_ppc", | |
+ genrule_cmd_file = "@envoy//bazel/external:wee8.genrule_cmd", | |
+ build_file = "@envoy//bazel/external:wee8.BUILD", | |
+ patches = [ | |
+ "@envoy//bazel/external:wee8.patch", | |
+ "@envoy//bazel/external:wee8-ppc.patch", | |
+ ], | |
+ ) | |
+ native.bind( | |
+ name = "wee8_ppc", | |
+ actual = "@com_googlesource_chromium_v8_ppc//:wee8", | |
+ ) | |
+ | |
+ | |
def _com_googlesource_chromium_v8(): | |
external_genrule_repository( | |
name = "com_googlesource_chromium_v8", | |
diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl | |
index ae8f64eb48..c52ba1b325 100644 | |
--- a/bazel/repository_locations.bzl | |
+++ b/bazel/repository_locations.bzl | |
@@ -1106,3 +1106,4 @@ REPOSITORY_LOCATIONS_SPEC = dict( | |
cpe = "N/A", | |
), | |
) | |
+REPOSITORY_LOCATIONS_SPEC["com_googlesource_chromium_v8_ppc"] = REPOSITORY_LOCATIONS_SPEC["com_googlesource_chromium_v8"] | |
diff --git a/test/tools/wee8_compile/BUILD b/test/tools/wee8_compile/BUILD | |
index 0f9fa2f4cf..a713424b54 100644 | |
--- a/test/tools/wee8_compile/BUILD | |
+++ b/test/tools/wee8_compile/BUILD | |
@@ -11,7 +11,7 @@ envoy_package() | |
envoy_cc_binary( | |
name = "wee8_compile_tool", | |
- deps = [":wee8_compile_lib"], | |
+ deps = select({"//conditions:default": [":wee8_compile_lib"] , "@envoy//bazel:apple":[":wee8_compile_lib_ppc"] }), | |
) | |
envoy_cc_library( | |
@@ -19,3 +19,9 @@ envoy_cc_library( | |
srcs = ["wee8_compile.cc"], | |
external_deps = ["wee8"], | |
) | |
+ | |
+envoy_cc_library( | |
+ name = "wee8_compile_lib_ppc", | |
+ srcs = ["wee8_compile.cc"], | |
+ external_deps = ["wee8_ppc"], | |
+) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment