From 58d48db42baef3e00bd2d1809c4a315e5852b2f8 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Tue, 5 Sep 2023 01:47:35 +0200 Subject: [PATCH] Fix vtorc in Makefile Signed-off-by: Tim Vaillancourt --- Makefile | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 292d4eaa713..95144b97161 100644 --- a/Makefile +++ b/Makefile @@ -67,15 +67,10 @@ ifndef NOBANNER echo $$(date): Building source tree endif bash ./build.env - # build all the binaries by default with CGO disabled. - # Binaries will be placed in ${VTROOTBIN}. - CGO_ENABLED=0 go build \ - -buildvcs=false \ - -trimpath $(EXTRA_BUILD_FLAGS) $(VT_GO_PARALLEL) \ - -ldflags "$(shell tools/build_version_flags.sh)" \ - -o ${VTROOTBIN} ./go/... - - CGO_ENABLED=1 go install -trimpath $(EXTRA_BUILD_FLAGS) $(VT_GO_PARALLEL) -ldflags "$(shell tools/build_version_flags.sh)" ./go/cmd/vtorc/... + # build all the binaries by default with CGO disabled + CGO_ENABLED=0 go install -trimpath $(EXTRA_BUILD_FLAGS) $(VT_GO_PARALLEL) -ldflags "$(shell tools/build_version_flags.sh)" ./go/... + # embed local resources in the vttablet executable + (cd go/cmd/vttablet && go run github.com/GeertJohan/go.rice/rice append --exec=../../../bin/vttablet) # cross-build can be used to cross-compile Vitess client binaries # Outside of select client binaries (namely vtctlclient & vtexplain), cross-compiled Vitess Binaries are not recommended for production deployments @@ -94,8 +89,6 @@ endif echo "Missing vttablet at: ${HOME}/go/bin/${GOOS}_${GOARCH}/vttablet" && exit; \ fi - # Cross-compiling w/ cgo isn't trivial and we don't need vtorc, so we can skip building it - debug: ifndef NOBANNER echo $$(date): Building source tree @@ -116,7 +109,7 @@ cross-install: cross-build # binaries mkdir -p "$${PREFIX}/bin" # Still no vtorc for cross-compile - cp "/go/bin/${GOOS}_${GOARCH}/"{mysqlctl,mysqlctld,vtadmin,vtctld,vtctlclient,vtctldclient,vtgate,vttablet,vtworker,vtbackup} "$${PREFIX}/bin/" + cp "/go/bin/${GOOS}_${GOARCH}/"{mysqlctl,mysqlctld,vtorc,vtadmin,vtctld,vtctlclient,vtctldclient,vtgate,vttablet,vtworker,vtbackup} "$${PREFIX}/bin/" # Install local install the binaries needed to run vitess locally # Usage: make install-local PREFIX=/path/to/install/root