Skip to content

Instantly share code, notes, and snippets.

@eoger
Last active May 4, 2020 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eoger/160cf76a49a59a7fc8167f1e7aada2c8 to your computer and use it in GitHub Desktop.
Save eoger/160cf76a49a59a7fc8167f1e7aada2c8 to your computer and use it in GitHub Desktop.
commit 8743a83ca9f86bfce391b88403ae305579dcfdab
Author: Edouard Oger <eoger@fastmail.com>
Date: Mon May 4 11:12:42 2020 -0400
try: -b o -p mac,linux64-mingw-w64 -u none
commit 2481d0efeb9fcdc103795d93116969de65ed75d2
Author: Edouard Oger <eoger@fastmail.com>
Date: Mon May 4 11:11:59 2020 -0400
Build NSS statically
diff --git a/automation/taskcluster/linux-mingw32/build_gyp.sh b/automation/taskcluster/linux-mingw32/build_gyp.sh
index f6c4a08028..d404c3fb45 100755
--- a/automation/taskcluster/linux-mingw32/build_gyp.sh
+++ b/automation/taskcluster/linux-mingw32/build_gyp.sh
@@ -15,7 +15,10 @@ nss/build.sh \
--static \
--nspr_target=x86_64-w64-mingw32 \
--target=x64 \
- -DOS="win"
+ -DOS="win" \
+ --static \
+ --disable-tests \
+ "$@"
# Package.
mkdir -p artifacts/build
diff --git a/automation/taskcluster/scripts/build_gyp.sh b/automation/taskcluster/scripts/build_gyp.sh
index e19a6362fc..7f6b222180 100755
--- a/automation/taskcluster/scripts/build_gyp.sh
+++ b/automation/taskcluster/scripts/build_gyp.sh
@@ -12,7 +12,7 @@ if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
fi
# Build.
-nss/build.sh -g -v --enable-libpkix "$@"
+nss/build.sh -g -v --static --disable-tests "$@"
# Package.
if [[ $(uname) = "Darwin" ]]; then
diff --git a/coreconf/config.gypi b/coreconf/config.gypi
index c1828db1b8..bc29ec3e0d 100644
--- a/coreconf/config.gypi
+++ b/coreconf/config.gypi
@@ -163,6 +163,23 @@
'<(nspr_include_dir)',
'<(nss_dist_dir)/private/<(module)',
],
+ 'defines': [
+ 'HMAC_Update=NSS_HMAC_Update',
+ 'HMAC_Init=NSS_HMAC_Init',
+ 'CMAC_Update=NSS_CMAC_Update',
+ 'CMAC_Init=NSS_CMAC_Init',
+ 'MD5_Update=NSS_MD5_Update',
+ 'SHA1_Update=NSS_SHA1_Update',
+ 'SHA256_Update=NSS_SHA256_Update',
+ 'SHA224_Update=NSS_SHA224_Update',
+ 'SHA512_Update=NSS_SHA512_Update',
+ 'SHA384_Update=NSS_SHA384_Update',
+ 'SEED_set_key=NSS_SEED_set_key',
+ 'SEED_encrypt=NSS_SEED_encrypt',
+ 'SEED_decrypt=NSS_SEED_decrypt',
+ 'SEED_ecb_encrypt=NSS_SEED_ecb_encrypt',
+ 'SEED_cbc_encrypt=NSS_SEED_cbc_encrypt',
+ ],
'conditions': [
[ 'mozpkix_only==1 and OS=="linux"', {
'include_dirs': [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment