aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-26 16:16:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-26 16:16:22 +0200
commit9f216cdbbeecf6ceb614acbeef842de3594a6ae5 (patch)
treeb6f876b3fd391cd2ffc7bcfea4aa1a966a80ad20
parentglobal: use filepath.Join uniformly (diff)
downloadwireguard-windows-9f216cdbbeecf6ceb614acbeef842de3594a6ae5.tar.xz
wireguard-windows-9f216cdbbeecf6ceb614acbeef842de3594a6ae5.zip
build: set 6.1 PE flags
-rw-r--r--Makefile1
-rw-r--r--build.bat1
2 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8075b2c8..9bc56260 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
GOFLAGS := -ldflags="-H windowsgui -s -w" -v -tags walk_use_cgo
export CGO_ENABLED := 1
export CGO_CFLAGS := -O3 -Wall -Wno-unused-function -Wno-switch -std=gnu11 -DWINVER=0x0601
+export CGO_LDFLAGS := -Wl,--major-os-version=6 -Wl,--minor-os-version=1 -Wl,--major-subsystem-version=6 -Wl,--minor-subsystem-version=1
export GOOS := windows
OLD_GOROOT := $(GOROOT)
export GOROOT := $(CURDIR)/.deps/goroot
diff --git a/build.bat b/build.bat
index b09c9512..4f0e1726 100644
--- a/build.bat
+++ b/build.bat
@@ -35,6 +35,7 @@ if exist .deps\prepared goto :render
set GOROOT=%STARTDIR%\.deps\go
set CGO_ENABLED=1
set CGO_CFLAGS=-O3 -Wall -Wno-unused-function -Wno-switch -std=gnu11 -DWINVER=0x0601
+ set CGO_LDFLAGS=-Wl,--major-os-version=6 -Wl,--minor-os-version=1 -Wl,--major-subsystem-version=6 -Wl,--minor-subsystem-version=1
call :build_plat x86 i686 386 || goto :error
call :build_plat amd64 x86_64 amd64 || goto :error