Commit f1d3d052 authored by Franziskus Kiefer's avatar Franziskus Kiefer

Bug 1372515 - allow enabling libpkix in gyp builds, r=ttaubert

Differential Revision: https://nss-review.dev.mozaws.net/D350

--HG--
extra : rebase_source : 0681eb9be3886a8832d70ffac5f6aa56e48d4a90
extra : histedit_source : ea1472a1175adbf6dc293151ea21776ed3467a23%2C6517c85322d5b1c39faff8290a8e3c46a0437c52
parent 87447326
......@@ -93,6 +93,7 @@ while [ $# -gt 0 ]; do
--system-sqlite) gyp_params+=(-Duse_system_sqlite=1) ;;
--with-nspr=?*) set_nspr_path "${1#*=}"; no_local_nspr=1 ;;
--system-nspr) set_nspr_path "/usr/include/nspr/:"; no_local_nspr=1 ;;
--enable-libpkix) gyp_params+=(-Ddisable_libpkix=0) ;;
*) show_help; exit 2 ;;
esac
shift
......
......@@ -33,6 +33,7 @@
'<(DEPTH)/lib/base/base.gyp:nssb',
'<(DEPTH)/lib/freebl/freebl.gyp:freebl',
'<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3',
'<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix',
],
'conditions': [
[ 'disable_dbm==0', {
......@@ -41,21 +42,6 @@
'<(DEPTH)/lib/softoken/legacydb/legacydb.gyp:nssdbm',
],
}],
[ 'disable_libpkix==0', {
'dependencies': [
'<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
'<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
'<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
'<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
'<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
'<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
'<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
'<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule'
],
}],
]},{ # !use_static_libs
'conditions': [
['moz_fold_libs==0', {
......
......@@ -51,6 +51,7 @@
'<(DEPTH)/lib/dev/dev.gyp:nssdev',
'<(DEPTH)/lib/pki/pki.gyp:nsspki',
'<(DEPTH)/lib/ssl/ssl.gyp:ssl',
'<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix',
],
'conditions': [
[ 'OS=="win"', {
......
......@@ -35,7 +35,8 @@
'<(DEPTH)/lib/dev/dev.gyp:nssdev',
'<(DEPTH)/lib/base/base.gyp:nssb',
'<(DEPTH)/lib/freebl/freebl.gyp:freebl',
'<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib'
'<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib',
'<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix',
],
'conditions': [
[ 'disable_dbm==0', {
......@@ -43,21 +44,6 @@
'<(DEPTH)/lib/dbm/src/src.gyp:dbm',
],
}],
[ 'disable_libpkix==0', {
'dependencies': [
'<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
'<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
'<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
'<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
'<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
'<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
'<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
'<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
],
}],
],
}
],
......
......@@ -62,6 +62,7 @@
'<(DEPTH)/lib/base/base.gyp:nssb',
'<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib',
'<(DEPTH)/cpputil/cpputil.gyp:cpputil',
'<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix',
],
'conditions': [
[ 'test_build==1', {
......@@ -81,21 +82,6 @@
'<(DEPTH)/lib/dbm/src/src.gyp:dbm',
],
}],
[ 'disable_libpkix==0', {
'dependencies': [
'<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
'<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
'<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
'<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
'<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
'<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
'<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
'<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
],
}],
],
}
],
......
......@@ -29,6 +29,7 @@
'<(DEPTH)/lib/dev/dev.gyp:nssdev',
'<(DEPTH)/lib/pki/pki.gyp:nsspki',
'<(DEPTH)/lib/ssl/ssl.gyp:ssl',
'<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix',
],
'conditions': [
[ 'OS=="win"', {
......
......@@ -2,7 +2,7 @@ Usage: build.sh [-hcv] [-j <n>] [--nspr] [--gyp|-g] [--opt|-o] [-m32]
[--test] [--pprof] [--scan-build[=output]] [--ct-verif]
[--asan] [--ubsan] [--msan] [--sancov[=edge|bb|func|...]]
[--disable-tests] [--fuzz[=tls|oss]] [--system-sqlite]
[--no-zdefs] [--with-nspr] [--system-nspr]
[--no-zdefs] [--with-nspr] [--system-nspr] [--enable-libpkix]
This script builds NSS with gyp and ninja.
......@@ -40,3 +40,4 @@ NSS build tool options:
--with-nspr=/path/to/nspr/include:/path/to/nspr/lib
--system-nspr use system nspr. This requires an installation of NSPR and
might not work on all systems.
--enable-libpkix make libpkix part of the build.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
{
'includes': [
'../../coreconf/config.gypi'
],
'targets': [
{
'target_name': 'libpkix',
'type': 'none',
'conditions': [
[ 'disable_libpkix==0', {
'dependencies': [
'pkix/certsel/certsel.gyp:pkixcertsel',
'pkix/checker/checker.gyp:pkixchecker',
'pkix/crlsel/crlsel.gyp:pkixcrlsel',
'pkix/params/params.gyp:pkixparams',
'pkix/results/results.gyp:pkixresults',
'pkix/store/store.gyp:pkixstore',
'pkix/top/top.gyp:pkixtop',
'pkix/util/util.gyp:pkixutil',
'pkix_pl_nss/module/module.gyp:pkixmodule',
'pkix_pl_nss/pki/pki.gyp:pkixpki',
'pkix_pl_nss/system/system.gyp:pkixsystem',
],
}],
],
},
],
}
\ No newline at end of file
......@@ -33,24 +33,8 @@
'<(DEPTH)/lib/pki/pki.gyp:nsspki',
'<(DEPTH)/lib/dev/dev.gyp:nssdev',
'<(DEPTH)/lib/base/base.gyp:nssb',
'<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix',
],
'conditions': [
[ 'disable_libpkix==0', {
'dependencies': [
'<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
'<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
'<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
'<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
'<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
'<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
'<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
'<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
'<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule'
],
}],
],
},
{
'target_name': 'nss3',
......
......@@ -100,7 +100,13 @@ class testAction(argparse.Action):
def runTest(self, test, cycles="standard"):
cwd = os.path.dirname(os.path.abspath(__file__))
domsuf = os.getenv('DOMSUF', "localdomain")
env = {"NSS_TESTS": test, "NSS_CYCLES": cycles, "DOMSUF": domsuf}
host = os.getenv('HOST', "localhost")
env = {
"NSS_TESTS": test,
"NSS_CYCLES": cycles,
"DOMSUF": domsuf,
"HOST": host
}
command = cwd + "/tests/all.sh"
subprocess.check_call(command, env=env)
......@@ -131,7 +137,7 @@ def parse_arguments():
parser_test = subparsers.add_parser(
'tests', help='Run tests through tests/all.sh.')
tests = [
"cipher", "lowhash", "libpkix", "cert", "dbtests", "tools", "fips",
"cipher", "lowhash", "chains", "cert", "dbtests", "tools", "fips",
"sdr", "crmf", "smime", "ssl", "ocsp", "merge", "pkits", "ec",
"gtests", "ssl_gtests"
]
......
......@@ -59,7 +59,8 @@
'lib/smime/smime.gyp:smime',
'lib/softoken/softoken.gyp:softokn',
'lib/ssl/ssl.gyp:ssl',
'lib/util/util.gyp:nssutil'
'lib/util/util.gyp:nssutil',
'lib/libpkix/libpkix.gyp:libpkix',
],
'conditions': [
[ 'OS=="linux"', {
......@@ -73,21 +74,6 @@
'lib/softoken/legacydb/legacydb.gyp:nssdbm',
],
}],
[ 'disable_libpkix==0', {
'dependencies': [
'lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
'lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
'lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
'lib/libpkix/pkix/params/params.gyp:pkixparams',
'lib/libpkix/pkix/results/results.gyp:pkixresults',
'lib/libpkix/pkix/store/store.gyp:pkixstore',
'lib/libpkix/pkix/top/top.gyp:pkixtop',
'lib/libpkix/pkix/util/util.gyp:pkixutil',
'lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule',
'lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
'lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
],
}],
[ 'use_system_sqlite==0', {
'dependencies': [
'lib/sqlite/sqlite.gyp:sqlite',
......
......@@ -42,9 +42,10 @@ your system environment to use the libraries of your build from the "lib"
directory, e.g., using the `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH`.
Usage: build.sh [-hcv] [-j <n>] [--nspr] [--gyp|-g] [--opt|-o] [-m32]
[--test] [--fuzz] [--pprof] [--scan-build[=output]]
[--test] [--pprof] [--scan-build[=output]] [--ct-verif]
[--asan] [--ubsan] [--msan] [--sancov[=edge|bb|func|...]]
[--ct-verif] [--disable-tests]
[--disable-tests] [--fuzz[=tls|oss]] [--system-sqlite]
[--no-zdefs] [--with-nspr] [--system-nspr] [--enable-libpkix]
This script builds NSS with gyp and ninja.
......@@ -62,7 +63,9 @@ directory, e.g., using the `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH`.
--opt|-o do an opt 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
--fuzz build fuzzing targets (this always enables test builds)
--fuzz=tls to enable TLS fuzzing mode
--fuzz=oss to build for OSS-Fuzz
--pprof build with gperftool support
--ct-verif build with valgrind for ct-verif
--scan-build run the build with scan-build (scan-build has to be in the path)
......@@ -74,6 +77,13 @@ directory, e.g., using the `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH`.
--sancov do sanitize coverage builds
--sancov=func sets coverage to function level for example
--disable-tests don't build tests and corresponding cmdline utils
--system-sqlite use system sqlite
--no-zdefs don't set -Wl,-z,defs
--with-nspr don't build NSPR but use the one at the given location, e.g.
--with-nspr=/path/to/nspr/include:/path/to/nspr/lib
--system-nspr use system nspr. This requires an installation of NSPR and
might not work on all systems.
--enable-libpkix make libpkix part of the build.
## Building NSS (legacy build system)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment