Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

82 righe
2.7 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. * Bash is required for running some tests, but not for building.
  14. * Go[5] is required for running some tests, but not for building. Note that
  15. these tests do not work on Windows.
  16. Using Ninja (note the 'N' is capitalized in the cmake invocation):
  17. mkdir build
  18. cd build
  19. cmake -GNinja ..
  20. ninja
  21. Using makefiles (does not work on Windows):
  22. mkdir build
  23. cd build
  24. cmake ..
  25. make
  26. You usually don't need to run cmake again after changing CMakeLists.txt files
  27. because the build scripts will detect changes to them and rebuild themselves
  28. automatically.
  29. Note that the default build flags in the top-level CMakeLists.txt are for
  30. debugging - optimisation isn't enabled.
  31. If you want to cross-compile then there are example toolchain files for 32-bit
  32. Intel and ARM in util/. Wipe out the build directory, recreate it and run cmake
  33. like this:
  34. cmake -DCMAKE_TOOLCHAIN_FILE=../util/arm-toolchain.cmake -GNinja ..
  35. If you want to build as a shared library, pass -DBUILD_SHARED_LIBS=1. On
  36. Windows, where functions need to be tagged with "dllimport" when coming from a
  37. shared library, define BORINGSSL_SHARED_LIBRARY in any code which #includes the
  38. BoringSSL headers.
  39. Known Limitations on Windows:
  40. * Versions of cmake since 3.0.2 have a bug in its Ninja generator that causes
  41. yasm to output warnings "yasm: warning: can open only one input file, only
  42. the last file will be processed". These warnings can be safely ignored.
  43. The cmake bug is http://www.cmake.org/Bug/view.php?id=15253.
  44. * cmake can generate Visual Studio projects, but the generated project files
  45. don't have steps for assembling the assembly language source files, so they
  46. currently cannot be used to build BoringSSL.
  47. * The tests written in Go do not work.
  48. [1] http://www.cmake.org/download/
  49. [2] https://martine.github.io/ninja/
  50. [3] https://www.python.org/downloads/
  51. [4] http://yasm.tortall.net/
  52. Either ensure yasm.exe is in %PATH% or configure CMAKE_ASM_NASM_COMPILER
  53. appropriately.
  54. [5] https://golang.org/dl/