@@ -22,11 +22,7 @@ Conscrypt requires that you have __Java__, __BoringSSL__ and the __Android SDK__
2222described below.
2323
2424#### Java
25- The build uses a version of Gradle which requires a __ Java 11__ JRE to run, however to ensure
26- backward compatibility Conscrypt itself is compiled with a __ Java 8__ JDK using Gradle's
27- recent Java toolchain support. At the least, you will need to install __ Java 11__ to run
28- Gradle, but if you do not also have __ Java 8__ then depending on the OS, Gradle will
29- try and install it automatically.
25+ The build uses a version of Gradle which requires a __ Java 11__ JDK.
3026
3127#### Android SDK
3228[ Download and install] ( https://developer.android.com/studio/install.html ) the latest Android SDK
@@ -62,9 +58,11 @@ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
6258ninja
6359```
6460
61+ You can also use the ` rebuild_boringssl.sh ` script (see below) to automate this process.
62+
6563##### Building on macOS.
6664When building Conscrypt on macOS it will build libraries for both x86 and ARM, and so BoringSSL
67- must also be build for each of these.
65+ must also be built for each of these.
6866
6967To build the x86_64 version:
7068``` bash
@@ -90,22 +88,34 @@ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
9088ninja
9189```
9290
91+ You can also use the ` rebuild_boringssl.sh ` script (see below) to automate this process.
9392
9493##### Building on Windows
95- This assumes that you have Microsoft Visual Studio 2017 installed along
96- with both the Windows 8.1 and 10 SDKs and that your machine is capable of
97- compiling 64-bit.
94+ This assumes that you have
95+ [ Git for Windows] ( https://gitforwindows.org/ ) and
96+ [ Microsoft Visual Studio 2022] ( https://visualstudio.microsoft.com/downloads/ )
97+ installed.
98+
99+ You'll also need ` nasm ` , ` cmake ` and ` ninja ` which can be usefully
100+ managed via a package tool such as
101+ [ Chocolatey] ( https://chocolatey.org/ ) .
102+
103+ Like Visual Studio 2017, Visual Studio 2022 provides a batch file
104+ to set up the correct environment for the compiler which can be invoked
105+ as follows (assuming a default installation):
106+ ``` bat
107+ call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
108+ ```
98109
99- Unlike earlier versions, Visual Studio 2017 doesn't appear to set an
100- environment variable to simplify building from the command line. The
101- instructions below assume the default installation of the community
102- edition. To use another edition or a non-standard install path, you'll
103- need to modify the paths below as appropriate.
110+ However, Visual Studio 2022 also sets up a _ Developer Command Prompt_
111+ in Windows Terminal which provides a simpler way of getting the
112+ correct compiler environment, defaulting to 64-bit mode.
104113
105- To build in 64-bit mode, set up with this command line:
114+ After either method, you can run Git for Windows' ` bash ` to get a
115+ more UNIX like environment with a working compiler.
106116
117+ To build BoringSSL in 64-bit mode from a Command Prompt:
107118``` bat
108- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
109119mkdir build64
110120cd build64
111121cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ^
@@ -115,7 +125,27 @@ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ^
115125ninja
116126```
117127
118- 32-bit mode is no longer supported.
128+ 32-bit mode is no longer supported on Windows.
129+
130+ If running ` bash ` , you can use the ` rebuild_boringssl ` script (see below)
131+ to automate this process.
132+
133+ ##### rebuild_boringssl.sh script
134+
135+ The script ` scripts/rebuild_boringssl.sh ` will build or rebuild BoringSSL
136+ with the correct configuration for the current architecture.
137+
138+ When run with no arguments, the script assumes that ` BORINGSSL_HOME ` is set
139+ correctly and will re-run ` cmake ` and ` ninja ` with the correct arguments.
140+
141+ The following arguments can be used to modify its behaviour:
142+
143+ * ` --clone ` May only be used if ` BORINGSSL_HOME ` is set but does not
144+ yet exist. Will clone BoringSSL from Github and build it.
145+
146+ * ` --clean ` Delete the current build directly and rebuild from scratch.
147+ * ` --pull ` or ` --update ` Updates the source tree to the latest revision and
148+ then builds. Note will not clean old builds unless ` --clean ` is also specified.
119149
120150Coverage
121151--------
0 commit comments