From 21014614fc220b77e9d0509b82231f212473d4ff Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 7 Apr 2015 17:26:21 +0800 Subject: [PATCH] Link boringssl as shared_library --- atom.gyp | 25 +++++++++++++++++++++++-- common.gypi | 6 ++++-- vendor/brightray | 2 +- vendor/node | 2 +- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/atom.gyp b/atom.gyp index 9c767ca3..31ac253b 100644 --- a/atom.gyp +++ b/atom.gyp @@ -127,7 +127,7 @@ ['libchromiumcontent_component', { 'copied_libraries': '<(libchromiumcontent_shared_libraries)', }, { - 'copied_libraries': [], + 'copied_libraries': ['<(libchromiumcontent_dir)/boringssl.dll'], }], ], }, @@ -161,8 +161,18 @@ ['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', @@ -187,6 +197,7 @@ 'atom_coffee2c', 'vendor/brightray/brightray.gyp:brightray', 'vendor/node/node.gyp:node', + 'vendor/node/deps/openssl/openssl.gyp:openssl', ], 'defines': [ 'PRODUCT_NAME="<(product_name)"', @@ -528,7 +539,7 @@ ['libchromiumcontent_component', { 'copied_libraries': '<(libchromiumcontent_shared_libraries)', }, { - 'copied_libraries': [], + 'copied_libraries': ['<(libchromiumcontent_dir)/libboringssl.dylib'], }], ], }, @@ -547,6 +558,16 @@ }, ], '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': [ diff --git a/common.gypi b/common.gypi index ee239488..c737efd8 100644 --- a/common.gypi +++ b/common.gypi @@ -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', @@ -105,7 +107,7 @@ ['_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"', { diff --git a/vendor/brightray b/vendor/brightray index 71a4624a..ae360b94 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 71a4624adf2e95ee57138d6f5f1b5c469c20c4b4 +Subproject commit ae360b94fff5a25222b3a535aad8bb4e7cd3b992 diff --git a/vendor/node b/vendor/node index 6a8c1dda..b1cd6a5f 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 6a8c1dda355e67303441afb4bb812b8428362f23 +Subproject commit b1cd6a5f5e0b18e666c1a27794c4f77992a96bb7 -- 2.43.0