Forráskód Böngészése

build: compile the agent without encoding/json v2

gnacho 2 hete
szülő
commit
d9e585ea8a
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      scripts/build-agents.sh

+ 4 - 0
scripts/build-agents.sh

@@ -32,6 +32,10 @@ fi
 mkdir -p "$OUT"
 export CGO_ENABLED=0
 export GOOS=linux
+# The agent only uses the encoding/json v1 API. json/v2 is on by default in
+# the Go 1.26 toolchain and costs about 124 KB per packed binary (#2095), so it
+# is compiled out unless the caller sets GOEXPERIMENT explicitly.
+export GOEXPERIMENT=${GOEXPERIMENT:-nojsonv2}
 
 build() {
 	local arch=$1 extra=$2