Commit 44c5fae3 authored by Martin Thomson's avatar Martin Thomson

Bug 1551129 - Enable --static build on windows, r=kevinjacobs

Summary:
Refinements for static building and linking.

Reviewers: KevinJacobs

Reviewed By: KevinJacobs

Bug #: 1551129

Differential Revision: https://phabricator.services.mozilla.com/D30853

--HG--
extra : rebase_source : 1dc71765d8e4a82014af98207341b3a42f9b3078
parent 5664284e
......@@ -150,11 +150,6 @@
'NSS_NO_INIT_SUPPORT',
],
}],
[ 'static_libs==1', {
'variables': {
'standalone_static_library': '1',
},
}],
[ 'OS!="android" and OS!="mac" and OS!="ios" and OS!="win"', {
'libraries': [
'-lpthread',
......@@ -231,7 +226,7 @@
'product_dir': '<(nss_dist_obj_dir)/lib'
}, '_type=="executable"', {
'product_dir': '<(nss_dist_obj_dir)/bin'
}, '_standalone_static_library==1', {
}, 'static_libs==1 or _standalone_static_library==1', {
'product_dir': '<(nss_dist_obj_dir)/lib'
}],
# mapfile handling
......@@ -322,6 +317,9 @@
},
},
}],
[ '_type=="static_library" and static_libs==1', {
'standalone_static_library': 1,
}],
],
'default_configuration': 'Debug',
'configurations': {
......
......@@ -21,6 +21,13 @@
'libraries': [
'-lws2_32',
],
'conditions': [
['static_libs==1', {
'libraries': [
'-ladvapi32',
],
}],
],
}],
['OS=="android"', {
'libraries': [
......
#include "nspr.h"
#include "nss.h"
#include "ssl.h"
#include <cstdlib>
......@@ -29,9 +28,6 @@ int main(int argc, char **argv) {
if (NSS_Initialize(workdir, "", "", SECMOD_DB, flags) != SECSuccess) {
return 1;
}
if (NSS_SetDomesticPolicy() != SECSuccess) {
return 1;
}
int rv = RUN_ALL_TESTS();
if (NSS_Shutdown() != SECSuccess) {
......
......@@ -99,7 +99,7 @@
}],
[ 'OS=="win"', {
'libraries': [
'advapi32.lib',
'-ladvapi32',
],
'conditions': [
[ 'cc_use_gnu_ld!=1 and target_arch=="x64"', {
......
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