Last active
July 10, 2023 02:42
-
-
Save sgnn7/ac0cd1fa1f62467f86459faea6436ded to your computer and use it in GitHub Desktop.
Build BoringCrypto / BoringSSL DLL on Windows 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS ...\boringssl> mkdir build | |
PS ...\boringssl> cd build | |
PS ...\boringssl> # Create build_boringssl.ps1 | |
PS ...\boringssl\build> powershell -executionpolicy bypass -File .\build_boringssl.ps1 | |
... | |
DLL is at ...\boringssl\build\outx64\ssl\ssl.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-StrictMode -Version latest | |
# $ErrorActionPreference = "Stop" | |
$invocation = (Get-Variable MyInvocation).Value | |
$directorypath = Split-Path $invocation.MyCommand.Path | |
Set-Location -Path "$directorypath" | |
$env:Path += ";C:\Program Files\CMake\bin" | |
$env:Path += ";C:\ProgramData\chocolatey\bin" | |
$env:Path += ";C:\Program Files\NASM" | |
$env:Path += ";C:\Go\bin" | |
$env:GOROOT = "C:\Go" | |
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" -NoNewWindow -Wait -ArgumentList "x64" | |
Remove-Item "outx64" -Recurse -ErrorAction Ignore | |
New-Item -Path "." -Name "outx64" -ItemType "directory" | Out-Null | |
Set-Location -Path "./outx64" | |
Start-Process cmake -NoNewWindow -Wait -ArgumentList "-DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -GNinja ..\.." | |
Start-Process ninja -NoNewWindow -Wait | |
Set-Location -Path "$directorypath" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index c266e1267..d7c88b34a 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -564,7 +564,7 @@ endif() | |
# Add minimal googletest targets. The provided one has many side-effects, and | |
# googletest has a very straightforward build. | |
-add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc) | |
+add_library(boringssl_gtest STATIC third_party/googletest/src/gtest-all.cc) | |
target_include_directories(boringssl_gtest PRIVATE third_party/googletest) | |
include_directories(third_party/googletest/include) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment