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

MAISTRA-1540: Don't build v8, use system's package #22

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 24 additions & 8 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -783,17 +783,33 @@ def _com_github_wavm_wavm():
)

def _com_googlesource_chromium_v8():
location = REPOSITORY_LOCATIONS["com_googlesource_chromium_v8"]
genrule_repository(
name = "com_googlesource_chromium_v8",
genrule_cmd_file = "@envoy//bazel/external:wee8.genrule_cmd",
build_file = "@envoy//bazel/external:wee8.BUILD",
patches = ["@envoy//bazel/external:wee8.patch"],
**location
native.new_local_repository(
name = "maistra_wee8_headers",
path = "/usr/include/wasm-api/",
build_file_content = """
cc_library(
name = "headers",
hdrs = glob(["**/*.h"]),
visibility = ["//visibility:public"],
)
"""
)
native.new_local_repository(
name = "maistra_wee8_libs",
path = "/usr/lib64/",
build_file_content = """
cc_library(
name = "wee8",
srcs = ["libwee8.a"],
deps = ["@maistra_wee8_headers//:headers"],
copts = ["-Iexternal/maistra_wee8_headers"],
visibility = ["//visibility:public"],
)
"""
)
native.bind(
name = "wee8",
actual = "@com_googlesource_chromium_v8//:wee8",
actual = "@maistra_wee8_libs//:wee8",
)

def _foreign_cc_dependencies():
Expand Down