mirror of
https://github.com/google/go-jsonnet.git
synced 2025-08-07 14:57:24 +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",
|
"internal.h",
|
||||||
"libjsonnet.cpp",
|
"libjsonnet.cpp",
|
||||||
],
|
],
|
||||||
cdeps = [
|
|
||||||
"@cpp_jsonnet//include:libjsonnet",
|
|
||||||
],
|
|
||||||
cgo = True,
|
cgo = True,
|
||||||
copts = ["-Wall -Icpp-jsonnet/include"], # keep
|
copts = ["-Wall"], # keep
|
||||||
cxxopts = ["-std=c++11 -Wall -Icpp-jsonnet/include"],
|
cxxopts = ["-std=c++11 -Wall"],
|
||||||
importpath = "github.com/google/go-jsonnet/c-bindings",
|
importpath = "github.com/google/go-jsonnet/c-bindings",
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/google/go-jsonnet/ast"
|
"github.com/google/go-jsonnet/ast"
|
||||||
"github.com/google/go-jsonnet/formatter"
|
"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"
|
// #include "internal.h"
|
||||||
"C"
|
"C"
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
extern "C" {
|
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"
|
#include "internal.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user