]> khamidou — GitHub mirrors - electron.git/commitdiff
Link boringssl and node together in one binary
authorCheng Zhao <zcbenz@gmail.com>
Tue, 7 Apr 2015 04:21:16 +0000 (12:21 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 7 Apr 2015 04:28:57 +0000 (12:28 +0800)
atom.gyp
atom/common/node_bindings.cc
common.gypi
script/bootstrap.py
script/lib/config.py
vendor/brightray
vendor/node

index 73c13b5dcb4911bd69cc05105473ee3fb2074a20..61f491148487705a296c8f48334c7a5c2472febf 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
         # Defined in Chromium but not exposed in its gyp file.
         'V8_USE_EXTERNAL_STARTUP_DATA',
         'ENABLE_PLUGINS',
+        # Needed by Node.
+        'NODE_WANT_INTERNALS=1',
       ],
       'sources': [
         '<@(lib_sources)',
                   ['libchromiumcontent_component', {
                     'copied_libraries': '<(libchromiumcontent_shared_libraries)',
                   }, {
-                    'copied_libraries': ['<(libchromiumcontent_dir)/libboringssl.dylib'],
+                    'copied_libraries': [],
                   }],
                 ],
               },
               'files': [
                 '<@(copied_libraries)',
                 '<(libchromiumcontent_dir)/ffmpegsumo.so',
-                '<(PRODUCT_DIR)/libnode.dylib',
               ],
             },
             {
             },
           ],
           'postbuilds': [
-            {
-              'postbuild_name': 'Fix path of libnode',
-              'action': [
-                'install_name_tool',
-                '-change',
-                '/usr/local/lib/libnode.dylib',
-                '@rpath/libnode.dylib',
-                '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
-              ],
-            },
-            {
-              'postbuild_name': 'Fix path of libboringssl',
-              'action': [
-                'install_name_tool',
-                '-change',
-                '/usr/local/lib/libboringssl.dylib',
-                '@rpath/libboringssl.dylib',
-                '${BUILT_PRODUCTS_DIR}/<(product_name) Framework.framework/Versions/A/<(product_name) Framework',
-              ],
-            },
             {
               'postbuild_name': 'Add symlinks for framework subdirectories',
               'action': [
index 05cdbe3c2ecf5e755532a211d39eef6edfe1cdd9..a021e92b8570ea8d8c07d341561a7f7da66c627c 100644 (file)
@@ -27,9 +27,7 @@ using content::BrowserThread;
 #define REFERENCE_MODULE(name) \
   extern "C" void _register_ ## name(void); \
   void (*fp_register_ ## name)(void) = _register_ ## name
-#if defined(OS_WIN)
-// On Windows Node is built as static_library so we need to reference Node's
-// builtin modules.
+// Node's builtin modules.
 REFERENCE_MODULE(cares_wrap);
 REFERENCE_MODULE(fs_event_wrap);
 REFERENCE_MODULE(buffer);
@@ -52,7 +50,6 @@ REFERENCE_MODULE(tty_wrap);
 REFERENCE_MODULE(udp_wrap);
 REFERENCE_MODULE(uv);
 REFERENCE_MODULE(js_stream);
-#endif  // defined(OS_WIN)
 // Atom Shell's builtin modules.
 REFERENCE_MODULE(atom_browser_app);
 REFERENCE_MODULE(atom_browser_auto_updater);
index c63bcd84ade4bea1f89bddcdb20d4aa0240200a7..2ca01a1e8b176a87ff995cbe1563e080dec225bf 100644 (file)
@@ -4,7 +4,6 @@
   ],
   'variables': {
     'clang': 0,
-    'openssl_no_asm': 1,
     'conditions': [
       ['OS=="mac" or OS=="linux"', {
         'clang': 1,
@@ -20,7 +19,7 @@
     'node_shared_cares': 'false',
     'node_shared_http_parser': 'false',
     'node_shared_libuv': 'false',
-    'node_shared_openssl': 'false',
+    'node_shared_openssl': 'true',
     'node_shared_v8': 'true',
     'node_shared_zlib': 'false',
     'node_tag': '',
@@ -40,7 +39,7 @@
   # Settings to compile node under Windows.
   'target_defaults': {
     'target_conditions': [
-      ['_target_name in ["libuv", "http_parser", "cares", "openssl", "openssl-cli", "node", "zlib"]', {
+      ['_target_name in ["libuv", "http_parser", "cares", "node", "zlib"]', {
         'msvs_disabled_warnings': [
           4703,  # potentially uninitialized local pointer variable 'req' used
           4013,  # 'free' undefined; assuming extern returning int
       ['_target_name in ["node", "atom_lib"]', {
         'include_dirs': [
           '<(libchromiumcontent_src_dir)/v8/include',
+          '<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
         ],
       }],
       ['_target_name=="node"', {
               'DYLIB_INSTALL_NAME_BASE': '@rpath'
             },
           }],
-          ['OS=="win"', {
-            'type': 'static_library',
-          }],
           ['OS=="linux"', {
             'cflags': [ '-fPIC' ],
           }],
index fadc7a20bda1f53d87a276200ab41a0e7f03820f..f3b2185ccf7f6f1987a4a09fdf70574d45ceb7c9 100755 (executable)
@@ -26,7 +26,7 @@ def main():
     enable_verbose_mode()
   if sys.platform == 'cygwin':
     update_win32_python()
-  update_submodules()
+  # update_submodules()
   update_node_modules('.')
   bootstrap_brightray(args.url)
 
index 48ed65ce9eb98cf346e1686f0bee2b3604a6169c..e98e5b1c8eb208a63d77e175682702b020ac99ab 100644 (file)
@@ -4,7 +4,7 @@ import platform
 import sys
 
 BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
-LIBCHROMIUMCONTENT_COMMIT = 'e0213676879061470efe50720368bce9b99aaa12'
+LIBCHROMIUMCONTENT_COMMIT = '2b564074393dcd3dd90e0edfc5a75099c2a72d1d'
 
 ARCH = {
     'cygwin': '32bit',
index a09b6c78b76fbbc019a9be72a0c5f2403f5c0763..d4c8ac2565a2e257c37215d9b65d6dd0267aad1b 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a09b6c78b76fbbc019a9be72a0c5f2403f5c0763
+Subproject commit d4c8ac2565a2e257c37215d9b65d6dd0267aad1b
index 790c4a3af36144fcdd5fe39d0cb6cd622f282434..6a8c1dda355e67303441afb4bb812b8428362f23 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 790c4a3af36144fcdd5fe39d0cb6cd622f282434
+Subproject commit 6a8c1dda355e67303441afb4bb812b8428362f23