mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add boringcrypto builds for linux (#9528)
* feat: add boringcrypto builds for linux Signed-off-by: Spike Curtis <spike@coder.com> * strip debug symbols, add BoringCryto to buildinfo Signed-off-by: Spike Curtis <spike@coder.com> * Fix TestVersion Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
@@ -105,6 +105,9 @@ CODER_ARCH_IMAGE_PREREQUISITES := \
|
||||
build/coder_$(VERSION)_%.tar.gz
|
||||
endif
|
||||
|
||||
# used to decide if we can build with boringcrypto
|
||||
local_os:=$(shell go env GOHOSTOS)
|
||||
local_arch:=$(shell go env GOHOSTARCH)
|
||||
|
||||
clean:
|
||||
rm -rf build site/out
|
||||
@@ -222,6 +225,12 @@ $(CODER_ALL_BINARIES): go.mod go.sum \
|
||||
build_args+=(--slim)
|
||||
fi
|
||||
|
||||
# boringcrypto is only supported on Linux
|
||||
# boringcrypto uses CGO, which isn't supported when cross compiling architectures
|
||||
if [[ "$$os" == "linux" ]] && [[ "${local_os}" == "linux" ]] && [[ "$$arch" == "${local_arch}" ]]; then
|
||||
build_args+=(--boringcrypto)
|
||||
fi
|
||||
|
||||
./scripts/build_go.sh "$${build_args[@]}"
|
||||
|
||||
if [[ "$$mode" == "slim" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user