Add cross-compiling documentation.

This commit is contained in:
Pietro Monteiro 2020-06-04 13:31:22 -04:00 committed by Brian Smith
parent f06811a150
commit 98e25317b3
2 changed files with 16 additions and 3 deletions

View File

@ -33,7 +33,19 @@ use Perl as a macro assembly language.
When building from Git for Windows, directories containing yasm.exe and
perl.exe must be in `%PATH%`, where yasm.exe is
[Yasm](http://yasm.tortall.net/Download.html) 1.3 or later and where perl.exe
is recommended to be [Strawberry Perl](http://strawberryperl.com).
is recommended to be [Strawberry Perl](http://strawberryperl.com).
Cross Compiling
---------------
When you build *ring* for a target that is different than the one you are using
for the build process you need to install the rust tool chain and a C/C++
compiler that can produce binaries for the intended target.
Besides the required dependencies you need to set the environment variables
`TARGET_CC` and `TARGET_AR` to the full path of the cross-compiler and the
cross-archiver respectively.
Supported Toolchains

View File

@ -50,8 +50,9 @@ See the documentation at
https://briansmith.org/rustdoc/ring/.
See [BUILDING.md](BUILDING.md) for instructions on how to build it. These
instructions are especially important on Windows when not building from
crates.io, as there are build prerequisites that need to be installed.
instructions are especially important for cross-compiling and for building on
Windows when not building from crates.io, as there are build prerequisites that
need to be installed.