Build node as shared library
This commit is contained in:
parent
761aa0e95c
commit
7e49645998
4 changed files with 40 additions and 8 deletions
18
atom.gyp
18
atom.gyp
|
@ -504,6 +504,7 @@
|
||||||
'<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak',
|
'<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak',
|
||||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
||||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
||||||
|
'<(PRODUCT_DIR)/node.dll',
|
||||||
'external_binaries/d3dcompiler_47.dll',
|
'external_binaries/d3dcompiler_47.dll',
|
||||||
'external_binaries/msvcp120.dll',
|
'external_binaries/msvcp120.dll',
|
||||||
'external_binaries/msvcr120.dll',
|
'external_binaries/msvcr120.dll',
|
||||||
|
@ -530,6 +531,7 @@
|
||||||
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
||||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
||||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
||||||
|
'<(PRODUCT_DIR)/libnode.so',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -548,7 +550,7 @@
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'atom_coffee2c',
|
'atom_coffee2c',
|
||||||
'vendor/brightray/brightray.gyp:brightray',
|
'vendor/brightray/brightray.gyp:brightray',
|
||||||
'vendor/node/node.gyp:node_lib',
|
'vendor/node/node.gyp:node',
|
||||||
],
|
],
|
||||||
'defines': [
|
'defines': [
|
||||||
'PRODUCT_NAME="<(product_name)"',
|
'PRODUCT_NAME="<(product_name)"',
|
||||||
|
@ -866,9 +868,6 @@
|
||||||
],
|
],
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
|
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
|
||||||
'LIBRARY_SEARCH_PATHS': [
|
|
||||||
'<(libchromiumcontent_library_dir)',
|
|
||||||
],
|
|
||||||
'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
|
'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
|
||||||
'LD_RUNPATH_SEARCH_PATHS': [
|
'LD_RUNPATH_SEARCH_PATHS': [
|
||||||
'@loader_path/Libraries',
|
'@loader_path/Libraries',
|
||||||
|
@ -883,6 +882,7 @@
|
||||||
'files': [
|
'files': [
|
||||||
'<(libchromiumcontent_library_dir)/ffmpegsumo.so',
|
'<(libchromiumcontent_library_dir)/ffmpegsumo.so',
|
||||||
'<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
|
'<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
|
||||||
|
'<(PRODUCT_DIR)/libnode.dylib',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -894,6 +894,16 @@
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'postbuilds': [
|
'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': 'Add symlinks for framework subdirectories',
|
'postbuild_name': 'Add symlinks for framework subdirectories',
|
||||||
'action': [
|
'action': [
|
||||||
|
|
26
common.gypi
26
common.gypi
|
@ -1,4 +1,7 @@
|
||||||
{
|
{
|
||||||
|
'includes': [
|
||||||
|
'vendor/brightray/brightray.gypi',
|
||||||
|
],
|
||||||
'variables': {
|
'variables': {
|
||||||
'clang': 0,
|
'clang': 0,
|
||||||
'openssl_no_asm': 1,
|
'openssl_no_asm': 1,
|
||||||
|
@ -37,7 +40,7 @@
|
||||||
# Settings to compile node under Windows.
|
# Settings to compile node under Windows.
|
||||||
'target_defaults': {
|
'target_defaults': {
|
||||||
'target_conditions': [
|
'target_conditions': [
|
||||||
['_target_name in ["libuv", "http_parser", "cares", "openssl", "openssl-cli", "node_lib", "zlib"]', {
|
['_target_name in ["libuv", "http_parser", "cares", "openssl", "openssl-cli", "node", "zlib"]', {
|
||||||
'msvs_disabled_warnings': [
|
'msvs_disabled_warnings': [
|
||||||
4703, # potentially uninitialized local pointer variable 'req' used
|
4703, # potentially uninitialized local pointer variable 'req' used
|
||||||
4013, # 'free' undefined; assuming extern returning int
|
4013, # 'free' undefined; assuming extern returning int
|
||||||
|
@ -96,11 +99,30 @@
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['_target_name in ["node_lib", "atom_lib"]', {
|
['_target_name in ["node", "atom_lib"]', {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'vendor/brightray/vendor/download/libchromiumcontent/src/v8/include',
|
'vendor/brightray/vendor/download/libchromiumcontent/src/v8/include',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
['_target_name=="node"', {
|
||||||
|
'conditions': [
|
||||||
|
['OS=="linux"', {
|
||||||
|
'libraries': [
|
||||||
|
'<(libchromiumcontent_library_dir)/libchromiumcontent.so',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['OS=="win"', {
|
||||||
|
'libraries': [
|
||||||
|
'<(libchromiumcontent_library_dir)/chromiumcontent.dll.lib',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['OS=="mac"', {
|
||||||
|
'libraries': [
|
||||||
|
'<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
}],
|
||||||
['_target_name=="libuv"', {
|
['_target_name=="libuv"', {
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
|
|
|
@ -38,7 +38,7 @@ def update_gyp():
|
||||||
|
|
||||||
ret = subprocess.call([python, gyp,
|
ret = subprocess.call([python, gyp,
|
||||||
'-f', 'ninja', '--depth', '.', 'atom.gyp',
|
'-f', 'ninja', '--depth', '.', 'atom.gyp',
|
||||||
'-Icommon.gypi', '-Ivendor/brightray/brightray.gypi',
|
'-Icommon.gypi',
|
||||||
'-Dlinux_clang=0', # Disable brightray's clang setting
|
'-Dlinux_clang=0', # Disable brightray's clang setting
|
||||||
'-Dtarget_arch={0}'.format(arch),
|
'-Dtarget_arch={0}'.format(arch),
|
||||||
'-Dlibrary=static_library'])
|
'-Dlibrary=static_library'])
|
||||||
|
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 6479eb98d5b3d9d25a86eff857af17dcc61f3bc4
|
Subproject commit ea394ef8974a06918af0c6f104a07bff3f4e627f
|
Loading…
Add table
Add a link
Reference in a new issue