mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-27 02:46:47 +01:00
vendor: update github.com/valyala/gozstd from v1.19.1 to v1.20.1
This commit is contained in:
parent
1fa5223237
commit
64fa95dc92
2
go.mod
2
go.mod
@ -29,7 +29,7 @@ require (
|
||||
github.com/valyala/fastjson v1.6.4
|
||||
github.com/valyala/fastrand v1.1.0
|
||||
github.com/valyala/fasttemplate v1.2.2
|
||||
github.com/valyala/gozstd v1.19.1
|
||||
github.com/valyala/gozstd v1.20.1
|
||||
github.com/valyala/histogram v1.2.0
|
||||
github.com/valyala/quicktemplate v1.7.0
|
||||
golang.org/x/net v0.10.0
|
||||
|
4
go.sum
4
go.sum
@ -443,8 +443,8 @@ github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G
|
||||
github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
|
||||
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
|
||||
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/valyala/gozstd v1.19.1 h1:6Ftg2xogscS/9FEdn+qJvM8AxifLNUK65Ez6tp3doYI=
|
||||
github.com/valyala/gozstd v1.19.1/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ=
|
||||
github.com/valyala/gozstd v1.20.1 h1:xPnnnvjmaDDitMFfDxmQ4vpx0+3CdTg2o3lALvXTU/g=
|
||||
github.com/valyala/gozstd v1.20.1/go.mod h1:y5Ew47GLlP37EkTB+B4s7r6A5rdaeB7ftbl9zoYiIPQ=
|
||||
github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ=
|
||||
github.com/valyala/histogram v1.2.0/go.mod h1:Hb4kBwb4UxsaNbbbh+RRz8ZR6pdodR57tzWUS3BUzXY=
|
||||
github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTcjMJzCM=
|
||||
|
70
vendor/github.com/valyala/gozstd/Makefile
generated
vendored
70
vendor/github.com/valyala/gozstd/Makefile
generated
vendored
@ -4,59 +4,67 @@ GOOS_GOARCH := $(GOOS)_$(GOARCH)
|
||||
GOOS_GOARCH_NATIVE := $(shell go env GOHOSTOS)_$(shell go env GOHOSTARCH)
|
||||
LIBZSTD_NAME := libzstd_$(GOOS_GOARCH).a
|
||||
ZSTD_VERSION ?= v1.5.5
|
||||
MUSL_BUILDER_IMAGE=golang:1.20.1-alpine
|
||||
BUILDER_IMAGE := local/builder_musl:2.0.0-$(shell echo $(MUSL_BUILDER_IMAGE) | tr : _)-1
|
||||
ZIG_BUILDER_IMAGE=euantorano/zig:0.10.1
|
||||
BUILDER_IMAGE := local/builder_musl:2.0.0-$(shell echo $(ZIG_BUILDER_IMAGE) | tr : _ | tr / _)-1
|
||||
|
||||
.PHONY: libzstd.a $(LIBZSTD_NAME)
|
||||
|
||||
libzstd.a: $(LIBZSTD_NAME)
|
||||
$(LIBZSTD_NAME):
|
||||
ifeq ($(GOOS_GOARCH),$(GOOS_GOARCH_NATIVE))
|
||||
rm -f $(LIBZSTD_NAME)
|
||||
cd zstd/lib && ZSTD_LEGACY_SUPPORT=0 MOREFLAGS=$(MOREFLAGS) $(MAKE) clean libzstd.a
|
||||
mv zstd/lib/libzstd.a $(LIBZSTD_NAME)
|
||||
else
|
||||
ifeq ($(GOOS_GOARCH),linux_arm)
|
||||
cd zstd/lib && CC=arm-linux-gnueabi-gcc ZSTD_LEGACY_SUPPORT=0 MOREFLAGS=$(MOREFLAGS) $(MAKE) clean libzstd.a
|
||||
mv zstd/lib/libzstd.a libzstd_linux_arm.a
|
||||
endif
|
||||
ifeq ($(GOOS_GOARCH),linux_arm64)
|
||||
cd zstd/lib && CC=aarch64-linux-gnu-gcc ZSTD_LEGACY_SUPPORT=0 MOREFLAGS=$(MOREFLAGS) $(MAKE) clean libzstd.a
|
||||
mv zstd/lib/libzstd.a libzstd_linux_arm64.a
|
||||
endif
|
||||
ifeq ($(GOOS_GOARCH),linux_musl_amd64)
|
||||
cd zstd/lib && ZSTD_LEGACY_SUPPORT=0 MOREFLAGS=$(MOREFLAGS) $(MAKE) clean libzstd.a
|
||||
mv zstd/lib/libzstd.a libzstd_linux_musl_amd64.a
|
||||
endif
|
||||
ifeq ($(GOOS_GOARCH),linux_musl_arm64)
|
||||
cd zstd/lib && ZSTD_LEGACY_SUPPORT=0 MOREFLAGS=$(MOREFLAGS) $(MAKE) clean libzstd.a
|
||||
mv zstd/lib/libzstd.a libzstd_linux_musl_arm64.a
|
||||
endif
|
||||
else ifeq ($(GOOS_GOARCH),linux_amd64)
|
||||
TARGET=x86_64-linux GOARCH=amd64 GOOS=linux $(MAKE) package-arch
|
||||
else ifeq ($(GOOS_GOARCH),linux_arm)
|
||||
TARGET=arm-linux-gnueabi GOARCH=arm GOOS=linux $(MAKE) package-arch
|
||||
else ifeq ($(GOOS_GOARCH),linux_arm64)
|
||||
TARGET=aarch64-linux GOARCH=arm64 GOOS=linux $(MAKE) package-arch
|
||||
else ifeq ($(GOOS_GOARCH),linux_musl_amd64)
|
||||
TARGET=x86_64-linux-musl GOARCH=amd64 GOOS=linux_musl $(MAKE) package-arch
|
||||
else ifeq ($(GOOS_GOARCH),linux_musl_arm64)
|
||||
TARGET=aarch64-linux-musl GOARCH=arm64 GOOS=linux_musl $(MAKE) package-arch
|
||||
else ifeq ($(GOOS_GOARCH),darwin_arm64)
|
||||
TARGET=aarch64-macos GOARCH=arm64 GOOS=darwin $(MAKE) package-arch
|
||||
else ifeq ($(GOOS_GOARCH),darwin_amd64)
|
||||
TARGET=x86_64-macos GOARCH=amd64 GOOS=darwin $(MAKE) package-arch
|
||||
else ifeq ($(GOOS_GOARCH),windows_amd64)
|
||||
TARGET=x86_64-windows GOARCH=amd64 GOOS=windows GOARCH=amd64 $(MAKE) package-arch
|
||||
endif
|
||||
|
||||
package-builder:
|
||||
(docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -q '$(BUILDER_IMAGE)$$') \
|
||||
|| docker build \
|
||||
--build-arg builder_image=$(MUSL_BUILDER_IMAGE) \
|
||||
--build-arg builder_image=$(ZIG_BUILDER_IMAGE) \
|
||||
--tag $(BUILDER_IMAGE) \
|
||||
builder
|
||||
|
||||
package-musl: package-builder
|
||||
package-arch: package-builder
|
||||
rm -f $(LIBZSTD_NAME)
|
||||
docker run --rm \
|
||||
--user $(shell id -u):$(shell id -g) \
|
||||
--mount type=bind,src="$(shell pwd)",dst=/zstd \
|
||||
-w /zstd \
|
||||
$(DOCKER_OPTS) \
|
||||
$(BUILDER_IMAGE) \
|
||||
sh -c "GOOS=linux_musl make clean libzstd.a"
|
||||
docker run --rm \
|
||||
--user $(shell id -u):$(shell id -g) \
|
||||
--mount type=bind,src="$(shell pwd)",dst=/zstd \
|
||||
--env CC=/opt/cross-builder/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc \
|
||||
-w /zstd \
|
||||
$(DOCKER_OPTS) \
|
||||
$(BUILDER_IMAGE) \
|
||||
sh -c "GOARCH=arm64 GOOS=linux_musl make clean libzstd.a"
|
||||
-c 'cd zstd/lib && \
|
||||
ZSTD_LEGACY_SUPPORT=0 AR="zig ar" \
|
||||
CC="zig cc -target $(TARGET)" \
|
||||
CXX="zig cc -target $(TARGET)" \
|
||||
MOREFLAGS=$(MOREFLAGS) \
|
||||
$(MAKE) clean libzstd.a'
|
||||
mv -f zstd/lib/libzstd.a $(LIBZSTD_NAME)
|
||||
|
||||
# freebsd and illumos aren't supported by zig compiler atm.
|
||||
release:
|
||||
GOOS=linux GOARCH=amd64 $(MAKE) libzstd.a
|
||||
GOOS=linux GOARCH=arm64 $(MAKE) libzstd.a
|
||||
GOOS=linux GOARCH=arm $(MAKE) libzstd.a
|
||||
GOOS=linux_musl GOARCH=amd64 $(MAKE) libzstd.a
|
||||
GOOS=linux_musl GOARCH=arm64 $(MAKE) libzstd.a
|
||||
GOOS=darwin GOARCH=arm64 $(MAKE) libzstd.a
|
||||
GOOS=darwin GOARCH=amd64 $(MAKE) libzstd.a
|
||||
GOOS=windows GOARCH=amd64 $(MAKE) libzstd.a
|
||||
|
||||
clean:
|
||||
rm -f $(LIBZSTD_NAME)
|
||||
|
13
vendor/github.com/valyala/gozstd/README.md
generated
vendored
13
vendor/github.com/valyala/gozstd/README.md
generated
vendored
@ -76,19 +76,6 @@ env CC=arm-linux-gnueabi-gcc GOOS=linux GOARCH=arm CGO_ENABLED=1 go build ./main
|
||||
|
||||
* [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)
|
||||
|
||||
### How to build for Windows x64
|
||||
|
||||
* download & install TDM64-GCC: https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm64-2/tdm64-gcc-10.3.0-2.exe
|
||||
* download & install GnuWin32-make: https://gnuwin32.sourceforge.net/downlinks/make.php
|
||||
* download & install CMake: https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-windows-x86_64.msi
|
||||
* `cd gozstd\zstd\cmake`
|
||||
* `mkdir out`
|
||||
* `cd out`
|
||||
* `cmake .. -DZSTD_BUILD_SHARED=OFF -DZSTD_BUILD_PROGRAMS=OFF -G "MinGW Makefiles"`
|
||||
* `make`
|
||||
* `copy lib/libzstd.a ../../../../libzstd_windows_amd64.a`
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
* Q: _Which go version is supported?_
|
||||
|
BIN
vendor/github.com/valyala/gozstd/libzstd_darwin_amd64.a
generated
vendored
BIN
vendor/github.com/valyala/gozstd/libzstd_darwin_amd64.a
generated
vendored
Binary file not shown.
BIN
vendor/github.com/valyala/gozstd/libzstd_darwin_arm64.a
generated
vendored
BIN
vendor/github.com/valyala/gozstd/libzstd_darwin_arm64.a
generated
vendored
Binary file not shown.
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_arm.a
generated
vendored
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_arm.a
generated
vendored
Binary file not shown.
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_arm64.a
generated
vendored
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_arm64.a
generated
vendored
Binary file not shown.
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_musl_amd64.a
generated
vendored
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_musl_amd64.a
generated
vendored
Binary file not shown.
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_musl_arm64.a
generated
vendored
BIN
vendor/github.com/valyala/gozstd/libzstd_linux_musl_arm64.a
generated
vendored
Binary file not shown.
BIN
vendor/github.com/valyala/gozstd/libzstd_windows_amd64.a
generated
vendored
BIN
vendor/github.com/valyala/gozstd/libzstd_windows_amd64.a
generated
vendored
Binary file not shown.
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -487,7 +487,7 @@ github.com/valyala/fastrand
|
||||
# github.com/valyala/fasttemplate v1.2.2
|
||||
## explicit; go 1.12
|
||||
github.com/valyala/fasttemplate
|
||||
# github.com/valyala/gozstd v1.19.1
|
||||
# github.com/valyala/gozstd v1.20.1
|
||||
## explicit; go 1.12
|
||||
github.com/valyala/gozstd
|
||||
# github.com/valyala/histogram v1.2.0
|
||||
|
Loading…
Reference in New Issue
Block a user