Using cpp_jsonnet as external repo

This commit is contained in:
Zhongpeng Lin 2020-08-26 16:18:41 -07:00 committed by Stanisław Barzowski
parent 570101d43c
commit eced33e88b
3 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
genrule(
name = "dumpstdlibast",
srcs = ["//cpp-jsonnet/stdlib"],
srcs = ["@cpp_jsonnet//stdlib"],
outs = ["stdast.go"],
cmd = "./$(location //cmd/dumpstdlibast) \"$<\" > \"$@\"",
tools = ["//cmd/dumpstdlibast"],

View File

@ -29,3 +29,10 @@ def jsonnet_go_repositories():
strip_prefix = "bazel-gazelle-38bd65ead186af23549480d6189b89c7c53c023e",
urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/38bd65ead186af23549480d6189b89c7c53c023e.zip"],
)
_maybe(
http_archive,
name = "cpp_jsonnet",
sha256 = "fa1a4047942797b7c4ed39718a20d63d1b98725fb5cf563efbc1ecca3375426f",
strip_prefix = "jsonnet-0.16.0",
urls = ["https://github.com/google/jsonnet/archive/v0.16.0.tar.gz"],
)

View File

@ -18,7 +18,7 @@ go_library(
"libjsonnet.cpp",
],
cdeps = [
"//cpp-jsonnet/include:libjsonnet",
"@cpp_jsonnet//include:libjsonnet",
],
cgo = True,
copts = ["-Wall -Icpp-jsonnet/include"], # keep