]> khamidou — GitHub mirrors - electron.git/commitdiff
Link boringssl as shared_library
authorCheng Zhao <zcbenz@gmail.com>
Tue, 7 Apr 2015 09:26:21 +0000 (17:26 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 7 Apr 2015 10:26:56 +0000 (18:26 +0800)
atom.gyp
common.gypi
vendor/brightray
vendor/node

index 9c767ca32702f717d704204a80a7b9b3e0186b38..31ac253b0ff4478ae5c86e5be4c7b6ec4868a084 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
                   ['libchromiumcontent_component', {
                     'copied_libraries': '<(libchromiumcontent_shared_libraries)',
                   }, {
-                    'copied_libraries': [],
+                    'copied_libraries': ['<(libchromiumcontent_dir)/boringssl.dll'],
                   }],
                 ],
               },
         ['OS=="linux"', {
           'copies': [
             {
+              'variables': {
+                'conditions': [
+                  ['libchromiumcontent_component', {
+                    'copied_libraries': '<(libchromiumcontent_shared_libraries)',
+                  }, {
+                    'copied_libraries': ['<(libchromiumcontent_dir)/libboringssl.so'],
+                  }],
+                ],
+              },
               'destination': '<(PRODUCT_DIR)',
               'files': [
+                '<@(copied_libraries)',
                 '<(libchromiumcontent_dir)/libffmpegsumo.so',
                 '<(libchromiumcontent_dir)/icudtl.dat',
                 '<(libchromiumcontent_dir)/content_shell.pak',
         'atom_coffee2c',
         'vendor/brightray/brightray.gyp:brightray',
         'vendor/node/node.gyp:node',
+        'vendor/node/deps/openssl/openssl.gyp:openssl',
       ],
       'defines': [
         'PRODUCT_NAME="<(product_name)"',
                   ['libchromiumcontent_component', {
                     'copied_libraries': '<(libchromiumcontent_shared_libraries)',
                   }, {
-                    'copied_libraries': [],
+                    'copied_libraries': ['<(libchromiumcontent_dir)/libboringssl.dylib'],
                   }],
                 ],
               },
             },
           ],
           'postbuilds': [
+            {
+              '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 ee23948808130aa68e4f199637dbdb67fcdb8d09..c737efd8be6b7b551440271c9c8f72823c6c1ee8 100644 (file)
@@ -14,6 +14,7 @@
     # Reflects node's config.gypi.
     'component%': 'static_library',
     'python': 'python',
+    'openssl_no_asm': 1,
     'node_install_npm': 'false',
     'node_prefix': '',
     'node_shared_cares': 'false',
@@ -39,7 +40,7 @@
   # Settings to compile node under Windows.
   'target_defaults': {
     'target_conditions': [
-      ['_target_name in ["libuv", "http_parser", "cares", "node", "zlib"]', {
+      ['_target_name in ["libuv", "http_parser", "openssl", "cares", "node", "zlib"]', {
         'msvs_disabled_warnings': [
           4703,  # potentially uninitialized local pointer variable 'req' used
           4013,  # 'free' undefined; assuming extern returning int
@@ -77,6 +78,7 @@
             '-Wno-unused-function',
             '-Wno-sometimes-uninitialized',
             '-Wno-pointer-sign',
+            '-Wno-sign-compare',
             '-Wno-string-plus-int',
             '-Wno-unused-variable',
             '-Wno-deprecated-declarations',
       ['_target_name in ["node", "atom_lib"]', {
         'include_dirs': [
           '<(libchromiumcontent_src_dir)/v8/include',
-          '<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
+          'vendor/node/deps/openssl/openssl/include',
         ],
       }],
       ['_target_name=="node"', {
index 71a4624adf2e95ee57138d6f5f1b5c469c20c4b4..ae360b94fff5a25222b3a535aad8bb4e7cd3b992 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 71a4624adf2e95ee57138d6f5f1b5c469c20c4b4
+Subproject commit ae360b94fff5a25222b3a535aad8bb4e7cd3b992
index 6a8c1dda355e67303441afb4bb812b8428362f23..b1cd6a5f5e0b18e666c1a27794c4f77992a96bb7 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 6a8c1dda355e67303441afb4bb812b8428362f23
+Subproject commit b1cd6a5f5e0b18e666c1a27794c4f77992a96bb7