fix(make): detect cmd.exe shell for native Windows ABE builds (#642)

* fix(make): detect cmd.exe shell for native Windows ABE builds
* Fix build command syntax in Makefile for Windows
This commit is contained in:
Daniel Uptain authored and GitHub committed 2026-09-25 13:42:16 +08:00
1 parent 0503d04d7a
commit 3b83bc7e3a
2 files changed
+21 -5

No files matched your search

+6 -3
View File
@@ -8,10 +8,13 @@ include crypto/windows/abe_native/Makefile.frag
build:
$(GO) build -o $(GOEXE) ./cmd/hack-browser-data
# Make sets these in the recipe environment on both POSIX and native Windows
# GNU Make, so we do not need a cmd.exe vs sh branch for build-windows.
build-windows: export GOOS := windows
build-windows: export GOARCH := amd64
build-windows: export CGO_ENABLED := 0
build-windows: $(ABE_BIN)
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 \
$(GO) build -tags abe_embed -trimpath -ldflags="-s -w" \
-o $(GOEXE).exe ./cmd/hack-browser-data
$(GO) build -tags abe_embed -trimpath -ldflags="-s -w" -o $(GOEXE).exe ./cmd/hack-browser-data
clean: payload-clean
rm -f $(GOEXE) $(GOEXE).exe