Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: runtime/bin/bin.gypi

Issue 10916081: Add secure sockets to dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Allow TLS sockets to build with both Chromium NSS and upstream NSS Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/bin.gypi
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index 45d808c5a62fe0efb4dd429b1ff0f8ea9832ca1a..a816fafa5d349a2c1f2583bcd9e4a7eaa24b8c6d 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -4,6 +4,7 @@
{
'variables': {
+ 'use_chromium_nss': 1,
Søren Gjesse 2012/09/28 09:17:31 Please add a comment here on the different NSSes t
'crypto_cc_file': '<(SHARED_INTERMEDIATE_DIR)/crypto_gen.cc',
'io_cc_file': '<(SHARED_INTERMEDIATE_DIR)/io_gen.cc',
'json_cc_file': '<(SHARED_INTERMEDIATE_DIR)/json_gen.cc',
@@ -228,6 +229,10 @@
],
'include_dirs': [
'..',
+ '/usr/include/nss',
+ '/usr/include/nspr',
Søren Gjesse 2012/09/28 09:17:31 Shouldn't the /usr/include/... paths only be there
+ '../nss',
+ '../nspr',
Søren Gjesse 2012/09/28 09:17:31 Shouldn't the ../... paths be ../third_party/...?
Bill Hesse 2012/10/31 16:33:29 All removed. Replaced by direct-dependent include
],
'sources': [
'builtin_natives.cc',
@@ -242,9 +247,13 @@
],
'conditions': [
['OS=="win"', {
- 'sources/' : [
+ 'sources/': [
['exclude', 'fdutils.h'],
],
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS=1',
Søren Gjesse 2012/09/28 09:17:31 Should this define go with the rest of the NSS con
Bill Hesse 2012/10/31 16:33:29 Yes. Done. On 2012/09/28 09:17:31, Søren Gjesse
+ ],
+
# TODO(antonm): fix the implementation.
# Current implementation accepts char* strings
# and therefore fails to compile once _UNICODE is
@@ -262,8 +271,74 @@
'link_settings': {
'libraries': [
'-ldl',
- ],
- },
+ ]}}]
+ ['use_chromium_nss==1', {
+ 'defines': [
+ 'CHROMIUM_NSS=1',
+ ],
+ 'dependencies': [
+ '../third_party/nss/nss.gyp:nss',
+ '../third_party/nss/nss.gyp:nspr',
+ '../third_party/nss/nss.gyp:nssckbi',
+ '../third_party/nss/nss.gyp:nss_static',
+ '../net/third_party/nss/ssl.gyp:libssl',
+ '../third_party/zlib/zlib.gyp:zlib',
+ ],
+ }, { # Else using an unmodified NSS distribution or libraries.
+ 'conditions': [
+ ['OS=="win"', {
+ 'include_dirs': [
+ # Should be NSS Distribution include directory.
Søren Gjesse 2012/09/28 09:17:31 Should we use a GYP variable to specify the NSS di
Bill Hesse 2012/10/31 16:33:29 Removed. On 2012/09/28 09:17:31, Søren Gjesse wro
+ '/src/nss-3.13.6/mozilla/dist/WINNT6.1_DBG.OBJ/include',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-lnss_static.lib', '-llibssl.lib', '-lcrnspr.lib',
+ '-lcrnss.lib', '-lcrnssckbi.lib', '-lsqlite3.lib',
+ '-lzlib.lib',
+ ]},
+ 'msvs_sttings': {
+ 'VSLinkerTool': {
+ 'AdditionalDependencies': [
+ 'nss_static.lib', 'libssl.lib', 'crnspr.lib', 'crnss.lib',
+ 'crnssckbi.lib', 'sqlite3.lib', 'zlib.lib',
+ ],
+ 'AdditionalLibraryDirectories': [
+ # Should be NSS Distribution library directory.
+ '/src/dart-all/dart/DebugIA32/lib'
+ ]}},
+ }],
+ ['OS=="mac"', {
+ 'include_dirs': [
+ # Add paths to NSS build include directories.
+ ],
+ 'link_settings': {
+ 'libraries': [
+ # Make relative to a NSS build.
+ '/Users/whesse/dart/nsslib/libnss3.dylib',
+ '/Users/whesse/dart/nsslib/libnspr4.dylib',
+ '/Users/whesse/dart/nsslib/libssl3.dylib',
+ ],
+ 'ldflags': [
+ '-lnss3',
+ '-lnspr4',
+ '-lssl3',
+ ],
+ },
+ }],
+ ['OS=="linux"', {
+ 'include_dirs': [
+ '/usr/include/nss',
+ '/usr/include/nspr',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-lnspr4',
+ '-lnss3',
+ '-lssl3',
+ ]},
+ }],
+ ],
}],
],
},

Powered by Google App Engine
This is Rietveld 408576698