You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
2.6 KiB

  1. Build Prerequisites:
  2. * CMake[1] 2.8.8 or later is required.
  3. * Perl 5.6.1 or later is required. On Windows, Strawberry Perl and MSYS Perl
  4. have both been reported to work.
  5. * On Windows you currently must use Ninja[2] to build; on other platforms,
  6. it is not required, but recommended, because it makes builds faster.
  7. * If you need to build Ninja from source, then a recent version of
  8. Python[3] is required (Python 2.7.5 works).
  9. * On Windows only, Yasm[4] is required.
  10. * A C compiler is required. On Windows, MSVC 12 (Visual Studio 2013) or later
  11. with Platform SDK 8.1 or later are supported. Recent versions of GCC and
  12. Clang should work on non-Windows platforms, and maybe on Windows too.
  13. * Go[5] is required for running tests, but not for building. Note that the
  14. runner.go tests do not work on Windows.
  15. Using Ninja (note the 'N' is capitalized in the cmake invocation):
  16. mkdir build
  17. cd build
  18. cmake -GNinja ..
  19. ninja
  20. Using makefiles (does not work on Windows):
  21. mkdir build
  22. cd build
  23. cmake ..
  24. make
  25. You usually don't need to run cmake again after changing CMakeLists.txt files
  26. because the build scripts will detect changes to them and rebuild themselves
  27. automatically.
  28. Note that the default build flags in the top-level CMakeLists.txt are for
  29. debugging - optimisation isn't enabled.
  30. If you want to cross-compile then there are example toolchain files for 32-bit
  31. Intel and ARM in util/. Wipe out the build directory, recreate it and run cmake
  32. like this:
  33. cmake -DCMAKE_TOOLCHAIN_FILE=../util/arm-toolchain.cmake -GNinja ..
  34. If you want to build as a shared library, pass -DBUILD_SHARED_LIBS=1. On
  35. Windows, where functions need to be tagged with "dllimport" when coming from a
  36. shared library, define BORINGSSL_SHARED_LIBRARY in any code which #includes the
  37. BoringSSL headers.
  38. Known Limitations on Windows:
  39. * Versions of cmake since 3.0.2 have a bug in its Ninja generator that causes
  40. yasm to output warnings "yasm: warning: can open only one input file, only
  41. the last file will be processed". These warnings can be safely ignored.
  42. The cmake bug is http://www.cmake.org/Bug/view.php?id=15253.
  43. * cmake can generate Visual Studio projects, but the generated project files
  44. don't have steps for assembling the assembly language source files, so they
  45. currently cannot be used to build BoringSSL.
  46. * The tests written in Go do not work.
  47. [1] http://www.cmake.org/download/
  48. [2] https://martine.github.io/ninja/
  49. [3] https://www.python.org/downloads/
  50. [4] http://yasm.tortall.net/
  51. Either ensure yasm.exe is in %PATH% or configure CMAKE_ASM_NASM_COMPILER
  52. appropriately.
  53. [5] https://golang.org/dl/