mirror of
https://github.com/google/go-jsonnet.git
synced 2025-08-06 14:27:30 +02:00
Remove dependency on cpp-jsonnet submodule from C bindings
This change allows us to build libgojsonnet from tarball downloaded from GitHub releases.
This commit is contained in:
parent
1c79f577ba
commit
2f73f6148f
@ -17,12 +17,9 @@ go_library(
|
||||
"internal.h",
|
||||
"libjsonnet.cpp",
|
||||
],
|
||||
cdeps = [
|
||||
"@cpp_jsonnet//include:libjsonnet",
|
||||
],
|
||||
cgo = True,
|
||||
copts = ["-Wall -Icpp-jsonnet/include"], # keep
|
||||
cxxopts = ["-std=c++11 -Wall -Icpp-jsonnet/include"],
|
||||
copts = ["-Wall"], # keep
|
||||
cxxopts = ["-std=c++11 -Wall"],
|
||||
importpath = "github.com/google/go-jsonnet/c-bindings",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"github.com/google/go-jsonnet/ast"
|
||||
"github.com/google/go-jsonnet/formatter"
|
||||
|
||||
// #cgo CXXFLAGS: -std=c++11 -Wall -I../cpp-jsonnet/include
|
||||
// #cgo CXXFLAGS: -std=c++11 -Wall
|
||||
// #include "internal.h"
|
||||
"C"
|
||||
)
|
||||
|
@ -2,7 +2,10 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
extern "C" {
|
||||
#include "libjsonnet.h"
|
||||
void jsonnet_gc_min_objects(struct JsonnetVm *vm, unsigned v);
|
||||
void jsonnet_gc_growth_trigger(struct JsonnetVm *vm, double v);
|
||||
char *jsonnet_realloc(JsonnetVm *vm, char *str, size_t sz);
|
||||
|
||||
#include "internal.h"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user