Don't allow Go to leak personal information

This commit is contained in:
Robert Bendun 2023-01-06 08:01:34 +01:00
parent 3183786271
commit a08389b60f
2 changed files with 2 additions and 6 deletions

View File

@ -4,7 +4,7 @@ Server=bin/$(os)/server/server.h bin/$(os)/server/server.o
$(Server) &: server/*.go server/**/*.go
cd server/; GOOS="$(GOOS)" GOARCH="$(GOARCH)" CGO_ENABLED=1 CC="$(CC)" \
go build -o ../bin/$(os)/server/server.o -buildmode=c-archive
go build -ldflags="-s -w" -trimpath -o ../bin/$(os)/server/server.o -buildmode=c-archive
bin/$(os)/bestline.o: lib/bestline/bestline.c lib/bestline/bestline.h
@echo "CC $@"

View File

@ -16,13 +16,9 @@ fi
mkdir -p "$Target"
if [[ "$(docker images -q "$Image")" == "" ]]; then
docker build -t "$Image" .
fi
sudo rm -rf bin/
# make os=linux CC=gcc CXX=g++ >/dev/null
docker run -it --rm -v "$(pwd):/musique" -w /musique "$Image" make os=linux CC=gcc-11 CXX=g++-11 >/dev/null
make os=linux CC=gcc-11 CXX=g++-11 >/dev/null
cp bin/musique "$Target"/musique-x86_64-linux