NSS/Build System: Difference between revisions

From MozillaWiki
< NSS
Jump to navigation Jump to search
(CC/CCC)
No edit summary
 
Line 8: Line 8:
     ./build.sh
     ./build.sh


* If <code>NSS_GYP_GEN=1</code> is set, <code>build.sh</code> runs gyp to generate ninja files.
==== Build Options ====
 
* <code>CC</code> and <code>CCC</code> can be used to set the used compiler
 
    Usage: build.sh [-hcgv] [-j <n>] [--test] [--fuzz] [--scan-build[=output]]
                    [-m32] [--opt|-o]
   
    This script builds NSS with gyp and ninja.
   
    This build system is still under development.  It does not yet support all
    the features or platforms that NSS supports.
   
    NSS build tool options:
   
        -h            display this help and exit
        -c            clean before build
        -g            force a rebuild of gyp (and NSPR, because why not)
        -j <n>        run at most <n> concurrent jobs
        -v            verbose build
        -m32          do a 32-bit build on a 64-bit system
        --test        ignore map files and export everything we have
        --fuzz        enable fuzzing mode. this always enables test builds
        --scan-build  run the build with scan-build (scan-build has to be in the path)
                      --scan-build=/out/path sets the output path for scan-build
        --opt|-o      do an opt build


==== Build Options ====
* 32-bit builds on 64-bit machines: <code>-Dtarget_arch=ia32</code> (gyp argument)
* disable_tests
* disable_tests
* disable_dbm
* disable_dbm
Line 18: Line 40:
* mozilla_client
* mozilla_client
* cross compiling <code>-DOS=android</code> (gyp argument)
* cross compiling <code>-DOS=android</code> (gyp argument)
* <code>CC</code> and <code>CCC</code> can be used to set the used compiler

Latest revision as of 16:40, 2 November 2016

Prerequisites to building with gyp

  • a recent version of gyp and ninja.
  • a build environment with pkg-config, make, configure
  • the NSPR source
  • the NSS source

Steps to build with gyp

   ./build.sh

Build Options

  • CC and CCC can be used to set the used compiler
   Usage: build.sh [-hcgv] [-j <n>] [--test] [--fuzz] [--scan-build[=output]]
                   [-m32] [--opt|-o]
   
   This script builds NSS with gyp and ninja.
   
   This build system is still under development.  It does not yet support all
   the features or platforms that NSS supports.
   
   NSS build tool options:
   
       -h            display this help and exit
       -c            clean before build
       -g            force a rebuild of gyp (and NSPR, because why not)
       -j <n>        run at most <n> concurrent jobs
       -v            verbose build
       -m32          do a 32-bit build on a 64-bit system
       --test        ignore map files and export everything we have
       --fuzz        enable fuzzing mode. this always enables test builds
       --scan-build  run the build with scan-build (scan-build has to be in the path)
                     --scan-build=/out/path sets the output path for scan-build
       --opt|-o      do an opt build
  • disable_tests
  • disable_dbm
  • disable_libpkix
  • ssl_enable_zlib
  • mozilla_client
  • cross compiling -DOS=android (gyp argument)