aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-25 11:18:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-25 13:32:27 +0200
commitb7b6781c4e24f85d1885906252d0153c92110277 (patch)
tree067787a072d64fc98d36a4056c253c700d81d8d0 /Makefile
parentui: do not scroll list view horizontally (diff)
downloadwireguard-windows-b7b6781c4e24f85d1885906252d0153c92110277.tar.xz
wireguard-windows-b7b6781c4e24f85d1885906252d0153c92110277.zip
build: enable aslr and dep
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b7117fd3..5c6951e5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
GOFLAGS := -ldflags="-H windowsgui -s -w" -v -tags walk_use_cgo -trimpath
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 -Wl,--tsaware
+export CGO_LDFLAGS := -Wl,--major-os-version=6 -Wl,--minor-os-version=1 -Wl,--major-subsystem-version=6 -Wl,--minor-subsystem-version=1 -Wl,--tsaware -Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
export GOOS := windows
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
@@ -24,6 +24,7 @@ resources_386.syso: $(RESOURCE_FILES)
amd64/wireguard.exe: export CC := x86_64-w64-mingw32-gcc
amd64/wireguard.exe: export GOARCH := amd64
+amd64/wireguard.exe: CGO_LDFLAGS += -Wl,--high-entropy-va
amd64/wireguard.exe: resources_amd64.syso $(SOURCE_FILES)
go build $(GOFLAGS) -o $@
@@ -50,6 +51,6 @@ deploy: amd64/wireguard.exe
scp $< $(DEPLOYMENT_HOST):$(DEPLOYMENT_PATH)
clean:
- rm -rf *.syso ui/icon/*.ico x86/ amd64/ .deps/
+ rm -rf *.syso ui/icon/*.ico x86/ amd64/
.PHONY: deploy clean fmt remaster all