diff options
Diffstat (limited to 'embeddable-dll-service/build.bat')
-rw-r--r-- | embeddable-dll-service/build.bat | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/embeddable-dll-service/build.bat b/embeddable-dll-service/build.bat index cae35f70..b4c29000 100644 --- a/embeddable-dll-service/build.bat +++ b/embeddable-dll-service/build.bat @@ -1,10 +1,10 @@ @echo off rem SPDX-License-Identifier: MIT -rem Copyright (C) 2019 WireGuard LLC. All Rights Reserved. +rem Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved. setlocal set BUILDDIR=%~dp0 -set PATH=%BUILDDIR%..\.deps\go\bin;%BUILDDIR%..\.deps;%PATH% +set PATH=%BUILDDIR%..\.deps\llvm-mingw\bin;%BUILDDIR%..\.deps\go\bin;%PATH% set PATHEXT=.exe cd /d %BUILDDIR% || exit /b 1 @@ -14,21 +14,27 @@ if exist ..\.deps\prepared goto :build :build set GOOS=windows + set GOARM=7 set GOPATH=%BUILDDIR%..\.deps\gopath set GOROOT=%BUILDDIR%..\.deps\go set CGO_ENABLED=1 set CGO_CFLAGS=-O3 -Wall -Wno-unused-function -Wno-switch -std=gnu11 -DWINVER=0x0601 - set CGO_LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols call :build_plat x86 i686 386 || goto :error - set CGO_LDFLAGS=%CGO_LDFLAGS% -Wl,--high-entropy-va call :build_plat amd64 x86_64 amd64 || goto :error + call :build_plat arm64 aarch64 arm64 || goto :error + +:sign + if exist ..\sign.bat call ..\sign.bat + if "%SigningCertificate%"=="" goto :success + if "%TimestampServer%"=="" goto :success + echo [+] Signing + signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d "WireGuard Tunnel" x86\tunnel.dll amd64\tunnel.dll arm64\tunnel.dll || goto :error :success echo [+] Success exit /b 0 :build_plat - set PATH=%BUILDDIR%..\.deps\%~2-w64-mingw32-native\bin;%PATH% set CC=%~2-w64-mingw32-gcc set GOARCH=%~3 mkdir %1 >NUL 2>&1 |