소스 검색

build: compile the agent without encoding/json v2 (#2096)

Nacho 2 주 전
부모
커밋
a146cb1361
1개의 변경된 파일과 4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      scripts/build-agents.sh

+ 4 - 0
scripts/build-agents.sh

@@ -32,6 +32,10 @@ fi
 mkdir -p "$OUT"
 mkdir -p "$OUT"
 export CGO_ENABLED=0
 export CGO_ENABLED=0
 export GOOS=linux
 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() {
 build() {
 	local arch=$1 extra=$2
 	local arch=$1 extra=$2