Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ Conscrypt requires that you have __Java__, __BoringSSL__ and the __Android SDK__
described below.

#### Java
The build uses a version of Gradle which requires a __Java 11__ JRE to run, however to ensure
backward compatibility Conscrypt itself is compiled with a __Java 8__ JDK using Gradle's
recent Java toolchain support. At the least, you will need to install __Java 11__ to run
Gradle, but if you do not also have __Java 8__ then depending on the OS, Gradle will
try and install it automatically.
The build uses a version of Gradle which requires a __Java 11__ JDK.

#### Android SDK
[Download and install](https://developer.android.com/studio/install.html) the latest Android SDK
Expand Down Expand Up @@ -64,7 +60,7 @@ ninja

##### Building on macOS.
When building Conscrypt on macOS it will build libraries for both x86 and ARM, and so BoringSSL
must also be build for each of these.
must also be built for each of these.

To build the x86_64 version:
```bash
Expand Down Expand Up @@ -92,18 +88,30 @@ ninja


##### Building on Windows
This assumes that you have Microsoft Visual Studio 2017 installed along
with both the Windows 8.1 and 10 SDKs and that your machine is capable of
compiling 64-bit.
This assumes that you have
[Git for Windows](https://gitforwindows.org/) and
[Microsoft Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)
installed.

You'll also need `nasm`, `cmake` and `ninja` which can be usefully
managed via a package tool such as
[Chocolatey](https://chocolatey.org/).

Like Visual Studio 2017, Visual Studio 2022 provides a batch file
to set up the correct environment for the compiler which can be invoked
as follows (assuming a default installation):
```bat
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
```

Unlike earlier versions, Visual Studio 2017 doesn't appear to set an
environment variable to simplify building from the command line. The
instructions below assume the default installation of the community
edition. To use another edition or a non-standard install path, you'll
need to modify the paths below as appropriate.
However, Visual Studio 2022 also sets up a _Developer Command Prompt_
in Windows Terminal which provides a simpler way of getting the
correct compiler environment, defaulting to 64-bit mode.

To build in 64-bit mode, set up with this command line:
After either method, you can run Git for Windows' `bash` to get a
more UNIX like environment with a working compiler.

To build BoringSSL in 64-bit mode from a Command Prompt:
```bat
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
mkdir build64
Expand All @@ -115,7 +123,7 @@ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ^
ninja
```

32-bit mode is no longer supported.
32-bit mode is no longer supported on Windows.

Coverage
--------
Expand Down