2013-06-19 13:31:57 +00:00
|
|
|
{
|
2015-04-01 12:26:46 +00:00
|
|
|
'includes': [
|
2015-07-01 07:47:21 +00:00
|
|
|
'toolchain.gypi',
|
2017-05-09 20:38:14 +00:00
|
|
|
'brightray/brightray.gypi',
|
2015-04-01 12:26:46 +00:00
|
|
|
],
|
2013-06-19 13:31:57 +00:00
|
|
|
'variables': {
|
2016-03-08 08:58:59 +00:00
|
|
|
# Tell crashpad to build as external project.
|
|
|
|
'crashpad_dependencies': 'external',
|
2014-12-10 01:25:45 +00:00
|
|
|
# Required by breakpad.
|
|
|
|
'os_bsd': 0,
|
2015-07-01 08:59:17 +00:00
|
|
|
'chromeos': 0,
|
2013-07-02 01:16:56 +00:00
|
|
|
# Reflects node's config.gypi.
|
2013-12-09 15:18:36 +00:00
|
|
|
'component%': 'static_library',
|
2017-11-03 09:00:25 +00:00
|
|
|
'debug_http2': 'false',
|
|
|
|
'debug_nghttp2': 'false',
|
2018-01-06 15:58:24 +00:00
|
|
|
# XXX(alexeykuzmin): Must match the clang version we use. See `clang -v`.
|
2018-04-29 17:03:11 +00:00
|
|
|
'llvm_version': '7.0',
|
2013-07-02 01:16:56 +00:00
|
|
|
'python': 'python',
|
2015-06-29 04:18:50 +00:00
|
|
|
'openssl_fips': '',
|
2015-04-07 09:26:21 +00:00
|
|
|
'openssl_no_asm': 1,
|
2016-07-24 12:19:30 +00:00
|
|
|
'use_openssl_def': 0,
|
2018-03-02 19:16:15 +00:00
|
|
|
'openssl_product': 'libopenssl.a',
|
2018-04-26 13:47:47 +00:00
|
|
|
'node_debug_lib': 'false',
|
2017-05-17 21:58:09 +00:00
|
|
|
'node_release_urlbase': 'https://atom.io/download/electron',
|
2016-04-05 20:28:50 +00:00
|
|
|
'node_byteorder': '<!(node <(DEPTH)/tools/get-endianness.js)',
|
2015-06-10 06:11:34 +00:00
|
|
|
'node_target_type': 'shared_library',
|
2013-07-02 01:16:56 +00:00
|
|
|
'node_install_npm': 'false',
|
|
|
|
'node_prefix': '',
|
2016-07-21 06:52:15 +00:00
|
|
|
'node_shared': 'true',
|
2013-07-02 01:16:56 +00:00
|
|
|
'node_shared_cares': 'false',
|
|
|
|
'node_shared_http_parser': 'false',
|
|
|
|
'node_shared_libuv': 'false',
|
2015-04-09 12:58:11 +00:00
|
|
|
'node_shared_openssl': 'false',
|
2013-07-02 01:16:56 +00:00
|
|
|
'node_shared_v8': 'true',
|
|
|
|
'node_shared_zlib': 'false',
|
|
|
|
'node_tag': '',
|
|
|
|
'node_use_dtrace': 'false',
|
|
|
|
'node_use_etw': 'false',
|
2014-06-28 11:31:04 +00:00
|
|
|
'node_use_mdb': 'false',
|
2013-07-02 01:16:56 +00:00
|
|
|
'node_use_openssl': 'true',
|
|
|
|
'node_use_perfctr': 'false',
|
2016-07-21 06:52:15 +00:00
|
|
|
'node_use_v8_platform': 'false',
|
|
|
|
'node_use_bundled_v8': 'false',
|
2016-09-08 06:26:02 +00:00
|
|
|
'node_enable_d8': 'false',
|
2014-06-28 11:31:04 +00:00
|
|
|
'uv_library': 'static_library',
|
|
|
|
'uv_parent_path': 'vendor/node/deps/uv',
|
|
|
|
'uv_use_dtrace': 'false',
|
2018-03-02 19:51:19 +00:00
|
|
|
'v8_base': '',
|
2013-12-09 15:18:36 +00:00
|
|
|
'v8_postmortem_support': 'false',
|
2014-12-07 21:09:50 +00:00
|
|
|
'v8_enable_i18n_support': 'false',
|
2017-07-11 17:09:02 +00:00
|
|
|
'v8_enable_inspector': '1',
|
2013-06-19 13:31:57 +00:00
|
|
|
},
|
2013-07-01 09:58:01 +00:00
|
|
|
# Settings to compile node under Windows.
|
|
|
|
'target_defaults': {
|
|
|
|
'target_conditions': [
|
2018-03-02 19:51:19 +00:00
|
|
|
['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "node_lib", "zlib", "nghttp2"]', {
|
2013-07-01 09:58:01 +00:00
|
|
|
'msvs_disabled_warnings': [
|
2016-03-10 06:57:03 +00:00
|
|
|
4003, # not enough actual parameters for macro 'V'
|
2013-07-01 09:58:01 +00:00
|
|
|
4013, # 'free' undefined; assuming extern returning int
|
2015-04-07 05:50:58 +00:00
|
|
|
4018, # signed/unsigned mismatch
|
2013-07-01 09:58:01 +00:00
|
|
|
4054, #
|
2015-06-23 02:18:43 +00:00
|
|
|
4055, # 'type cast' : from data pointer 'void *' to function pointer
|
2013-07-01 09:58:01 +00:00
|
|
|
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
|
2016-05-10 11:08:47 +00:00
|
|
|
4065, # switch statement contains 'default' but no 'case' labels
|
2018-03-09 05:54:25 +00:00
|
|
|
4129, # unrecognized character escape sequence
|
2013-07-01 09:58:01 +00:00
|
|
|
4189, #
|
|
|
|
4131, # uses old-style declarator
|
|
|
|
4133, # incompatible types
|
2013-12-17 06:01:40 +00:00
|
|
|
4146, # unary minus operator applied to unsigned type, result still unsigned
|
2015-06-23 02:18:43 +00:00
|
|
|
4164, # intrinsic function not declared
|
2013-07-01 09:58:01 +00:00
|
|
|
4152, # function/data pointer conversion in expression
|
|
|
|
4206, # translation unit is empty
|
|
|
|
4204, # non-constant aggregate initializer
|
2015-04-07 06:03:16 +00:00
|
|
|
4210, # nonstandard extension used : function given file scope
|
2013-07-01 10:45:46 +00:00
|
|
|
4214, # bit field types other than int
|
2013-07-01 10:36:58 +00:00
|
|
|
4232, # address of dllimport 'free' is not static, identity not guaranteed
|
2014-01-13 10:43:09 +00:00
|
|
|
4291, # no matching operator delete found
|
2013-07-01 10:36:58 +00:00
|
|
|
4295, # array is too small to include a terminating null character
|
2018-03-09 05:54:25 +00:00
|
|
|
4309, # 'static_cast': truncation of constant value
|
2016-05-10 04:09:41 +00:00
|
|
|
4311, # 'type cast': pointer truncation from 'void *const ' to 'unsigned long'
|
2013-07-01 09:58:01 +00:00
|
|
|
4389, # '==' : signed/unsigned mismatch
|
2016-05-10 04:09:41 +00:00
|
|
|
4456, # declaration of 'm' hides previous local declaration
|
|
|
|
4457, # declaration of 'message' hides function parameter
|
|
|
|
4459, # declaration of 'wq' hides global declaration
|
|
|
|
4477, # format string '%.*s' requires an argument of type 'int'
|
2013-07-01 09:58:01 +00:00
|
|
|
4505, # unreferenced local function has been removed
|
|
|
|
4701, # potentially uninitialized local variable 'sizew' used
|
2015-06-23 02:18:43 +00:00
|
|
|
4703, # potentially uninitialized local pointer variable 'req' used
|
2013-07-01 09:58:01 +00:00
|
|
|
4706, # assignment within conditional expression
|
2014-01-13 10:41:40 +00:00
|
|
|
4804, # unsafe use of type 'bool' in operation
|
|
|
|
4996, # this function or variable may be unsafe.
|
2013-07-01 09:58:01 +00:00
|
|
|
],
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'WarnAsError': 'false',
|
|
|
|
},
|
|
|
|
},
|
2013-07-02 01:16:56 +00:00
|
|
|
'xcode_settings': {
|
2013-11-12 10:16:37 +00:00
|
|
|
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
|
|
|
|
'WARNING_CFLAGS': [
|
2015-09-10 03:15:35 +00:00
|
|
|
'-Wno-unknown-warning-option',
|
2013-11-12 10:16:37 +00:00
|
|
|
'-Wno-parentheses-equality',
|
|
|
|
'-Wno-unused-function',
|
|
|
|
'-Wno-sometimes-uninitialized',
|
|
|
|
'-Wno-pointer-sign',
|
2015-04-07 09:26:21 +00:00
|
|
|
'-Wno-sign-compare',
|
2013-11-12 10:16:37 +00:00
|
|
|
'-Wno-string-plus-int',
|
|
|
|
'-Wno-unused-variable',
|
|
|
|
'-Wno-deprecated-declarations',
|
|
|
|
'-Wno-return-type',
|
2014-12-03 23:21:50 +00:00
|
|
|
'-Wno-gnu-folding-constant',
|
2015-09-02 09:31:08 +00:00
|
|
|
'-Wno-shift-negative-value',
|
2016-08-11 18:55:56 +00:00
|
|
|
'-Wno-varargs', # https://git.io/v6Olj
|
2018-03-12 05:50:49 +00:00
|
|
|
'-Wno-unused-private-field',
|
2013-11-12 10:16:37 +00:00
|
|
|
],
|
2013-07-02 01:16:56 +00:00
|
|
|
},
|
2013-12-31 11:40:19 +00:00
|
|
|
'conditions': [
|
|
|
|
['OS=="linux"', {
|
|
|
|
'cflags': [
|
|
|
|
'-Wno-unused-function',
|
|
|
|
'-Wno-unused-variable',
|
2014-02-20 10:58:56 +00:00
|
|
|
'-Wno-unused-value',
|
2013-12-31 11:40:19 +00:00
|
|
|
'-Wno-deprecated-declarations',
|
|
|
|
'-Wno-return-type',
|
2016-12-15 02:06:59 +00:00
|
|
|
'-Wno-format',
|
2016-08-11 18:55:56 +00:00
|
|
|
'-Wno-varargs', # https://git.io/v6Olj
|
2015-04-10 04:07:53 +00:00
|
|
|
# Required when building as shared library.
|
|
|
|
'-fPIC',
|
2013-12-31 11:40:19 +00:00
|
|
|
],
|
|
|
|
}],
|
2017-11-21 12:48:06 +00:00
|
|
|
['OS=="linux" and clang==1', {
|
|
|
|
'cflags': [
|
|
|
|
'-Wno-pointer-sign',
|
|
|
|
'-Wno-parentheses-equality',
|
|
|
|
'-Wno-sometimes-uninitialized',
|
|
|
|
'-Wno-string-plus-int',
|
|
|
|
'-Wno-shift-negative-value',
|
|
|
|
'-Wno-reserved-user-defined-literal',
|
2018-03-12 05:50:49 +00:00
|
|
|
'-Wno-implicit-function-declaration',
|
|
|
|
'-Wno-long-long',
|
2017-11-21 12:48:06 +00:00
|
|
|
],
|
|
|
|
}],
|
2013-12-31 11:40:19 +00:00
|
|
|
],
|
2013-07-01 09:58:01 +00:00
|
|
|
}],
|
2018-03-02 19:51:19 +00:00
|
|
|
['_target_name=="node_lib"', {
|
2015-06-10 06:11:34 +00:00
|
|
|
'include_dirs': [
|
2017-02-07 08:07:43 +00:00
|
|
|
'<(libchromiumcontent_src_dir)',
|
|
|
|
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
|
|
|
|
'<(libchromiumcontent_src_dir)/third_party/icu/source/i18n',
|
2015-06-10 06:11:34 +00:00
|
|
|
'<(libchromiumcontent_src_dir)/v8',
|
|
|
|
'<(libchromiumcontent_src_dir)/v8/include',
|
|
|
|
],
|
2017-10-26 09:29:55 +00:00
|
|
|
'defines': [
|
|
|
|
# Export V8 symbols from node.dll / libnode.so
|
|
|
|
'BUILDING_V8_SHARED',
|
|
|
|
'BUILDING_V8_PLATFORM_SHARED',
|
|
|
|
'BUILDING_V8_BASE_SHARED',
|
2018-06-20 07:10:37 +00:00
|
|
|
'NODE_WITHOUT_NODE_OPTIONS',
|
2017-10-26 09:29:55 +00:00
|
|
|
],
|
2015-04-10 04:07:53 +00:00
|
|
|
'conditions': [
|
2015-04-10 05:24:58 +00:00
|
|
|
['OS=="mac" and libchromiumcontent_component==0', {
|
2016-06-18 13:26:26 +00:00
|
|
|
# -all_load is the "whole-archive" on macOS.
|
2015-04-10 05:24:58 +00:00
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [ '-Wl,-all_load' ],
|
|
|
|
},
|
|
|
|
}],
|
2015-04-11 11:51:11 +00:00
|
|
|
['OS=="win"', {
|
2016-05-19 08:02:40 +00:00
|
|
|
# Fix passing fd across modules, see |osfhandle.h| for more.
|
|
|
|
'sources': [
|
|
|
|
'<(DEPTH)/atom/node/osfhandle.cc',
|
|
|
|
'<(DEPTH)/atom/node/osfhandle.h',
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'<(DEPTH)/atom/node',
|
|
|
|
],
|
2016-12-12 01:35:29 +00:00
|
|
|
'libraries': [
|
|
|
|
# Node is using networking API but linking with this itself.
|
|
|
|
'-lwinmm.lib',
|
|
|
|
# Needed by V8.
|
|
|
|
'-ldbghelp.lib',
|
|
|
|
'-lshlwapi.lib',
|
|
|
|
],
|
2018-03-13 07:19:06 +00:00
|
|
|
'msvs_settings': {
|
|
|
|
# Change location of some hard-coded paths.
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalOptions!': [
|
|
|
|
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\zlib<(STATIC_LIB_SUFFIX)',
|
|
|
|
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\libuv<(STATIC_LIB_SUFFIX)',
|
|
|
|
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\libopenssl<(openssl_product)',
|
|
|
|
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\<(openssl_product)',
|
|
|
|
],
|
|
|
|
'AdditionalOptions': [
|
|
|
|
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\obj\\vendor\\node\\deps\\zlib\\zlib<(STATIC_LIB_SUFFIX)',
|
|
|
|
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\obj\\vendor\\node\\deps\\uv\\libuv<(STATIC_LIB_SUFFIX)',
|
|
|
|
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\obj\\vendor\\node\\deps\\openssl\\openssl<(STATIC_LIB_SUFFIX)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2015-04-10 07:35:25 +00:00
|
|
|
}],
|
2015-04-10 04:07:53 +00:00
|
|
|
['OS=="linux" and libchromiumcontent_component==0', {
|
2015-04-10 05:24:58 +00:00
|
|
|
# Prevent the linker from stripping symbols.
|
2015-04-10 04:07:53 +00:00
|
|
|
'ldflags': [
|
|
|
|
'-Wl,--whole-archive',
|
|
|
|
'<@(libchromiumcontent_v8_libraries)',
|
|
|
|
'-Wl,--no-whole-archive',
|
|
|
|
],
|
|
|
|
}, {
|
2018-01-30 06:28:32 +00:00
|
|
|
'libraries': [
|
|
|
|
'<@(libchromiumcontent_v8_libraries)',
|
|
|
|
],
|
2015-04-10 04:07:53 +00:00
|
|
|
}],
|
|
|
|
],
|
2015-04-01 12:26:46 +00:00
|
|
|
}],
|
2015-04-10 09:56:46 +00:00
|
|
|
['_target_name=="openssl"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
|
|
|
|
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
|
|
|
|
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
|
|
|
|
},
|
|
|
|
'cflags': [
|
|
|
|
'-fvisibility=hidden',
|
|
|
|
],
|
|
|
|
}],
|
2018-03-12 06:12:33 +00:00
|
|
|
['_target_name=="openssl-cli"', {
|
|
|
|
'ldflags!': [
|
|
|
|
'-nostdlib++',
|
|
|
|
]
|
|
|
|
}],
|
2013-10-28 02:43:01 +00:00
|
|
|
['_target_name=="libuv"', {
|
|
|
|
'conditions': [
|
|
|
|
['OS=="win"', {
|
|
|
|
# Expose libuv's symbols.
|
|
|
|
'defines': [
|
|
|
|
'BUILDING_UV_SHARED=1',
|
|
|
|
],
|
|
|
|
}], # OS=="win"
|
|
|
|
],
|
|
|
|
}],
|
2016-09-06 08:24:37 +00:00
|
|
|
['_target_name.startswith("crashpad")', {
|
|
|
|
'conditions': [
|
|
|
|
['OS=="mac"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'WARNING_CFLAGS': [
|
|
|
|
'-Wno-unused-private-field',
|
2017-01-19 23:32:03 +00:00
|
|
|
'-Wno-address-of-packed-member',
|
2016-09-06 08:24:37 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
}], # OS=="mac"
|
|
|
|
],
|
|
|
|
}],
|
2013-11-15 14:52:08 +00:00
|
|
|
['_target_name.startswith("breakpad") or _target_name in ["crash_report_sender", "dump_syms"]', {
|
2014-02-26 07:43:22 +00:00
|
|
|
'conditions': [
|
|
|
|
['OS=="mac"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'WARNING_CFLAGS': [
|
|
|
|
'-Wno-deprecated-declarations',
|
2014-05-09 02:04:13 +00:00
|
|
|
'-Wno-deprecated-register',
|
2014-02-26 07:43:22 +00:00
|
|
|
'-Wno-unused-private-field',
|
|
|
|
'-Wno-unused-function',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}], # OS=="mac"
|
|
|
|
['OS=="linux"', {
|
|
|
|
'cflags': [
|
|
|
|
'-Wno-empty-body',
|
|
|
|
],
|
|
|
|
}], # OS=="linux"
|
2015-04-07 05:50:58 +00:00
|
|
|
['OS=="win"', {
|
|
|
|
'msvs_disabled_warnings': [
|
|
|
|
# unreferenced local function has been removed.
|
|
|
|
4505,
|
|
|
|
],
|
|
|
|
}], # OS=="win"
|
2014-02-26 07:43:22 +00:00
|
|
|
],
|
2013-11-12 10:16:37 +00:00
|
|
|
}],
|
2018-03-02 19:51:19 +00:00
|
|
|
['OS=="linux" and _toolset=="target" and _target_name in ["dump_syms", "node_lib"]', {
|
2018-01-30 06:28:32 +00:00
|
|
|
'conditions': [
|
|
|
|
['libchromiumcontent_component==0', {
|
|
|
|
'libraries': [
|
|
|
|
'<(libchromiumcontent_dir)/libc++.a',
|
|
|
|
],
|
2018-01-30 11:07:35 +00:00
|
|
|
'ldflags': [
|
|
|
|
'-lpthread',
|
|
|
|
],
|
2018-01-30 06:28:32 +00:00
|
|
|
}, {
|
|
|
|
'libraries': [
|
|
|
|
'<(libchromiumcontent_dir)/libc++.so',
|
|
|
|
],
|
|
|
|
'ldflags': [
|
|
|
|
'-Wl,-rpath=\$$ORIGIN',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}]
|
2013-07-01 09:58:01 +00:00
|
|
|
],
|
|
|
|
'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail.
|
|
|
|
'msvs_disabled_warnings': [
|
|
|
|
4005, # (node.h) macro redefinition
|
2016-03-27 10:50:34 +00:00
|
|
|
4091, # (node_extern.h) '__declspec(dllimport)' : ignored on left of 'node::Environment' when no variable is declared
|
2017-01-26 07:10:28 +00:00
|
|
|
4099, # (pdf_render_settings.h) type name first seen using 'class' now seen using 'struct'
|
2013-07-02 10:47:51 +00:00
|
|
|
4189, # local variable is initialized but not referenced
|
2013-07-01 09:58:01 +00:00
|
|
|
4201, # (uv.h) nameless struct/union
|
2015-04-11 11:17:03 +00:00
|
|
|
4267, # conversion from 'size_t' to 'int', possible loss of data
|
2016-05-10 04:09:41 +00:00
|
|
|
4302, # (atldlgs.h) 'type cast': truncation from 'LPCTSTR' to 'WORD'
|
|
|
|
4458, # (atldlgs.h) declaration of 'dwCommonButtons' hides class member
|
2014-12-16 19:27:38 +00:00
|
|
|
4503, # decorated name length exceeded, name was truncated
|
2017-10-10 18:31:28 +00:00
|
|
|
4530, # C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
|
|
|
|
4577, # 'noexcept' used with no exception handling mode specified
|
2017-04-17 10:42:12 +00:00
|
|
|
4714, # (atomicstring.h) function marked as __forceinline not inlined
|
2013-07-01 09:58:01 +00:00
|
|
|
4800, # (v8.h) forcing value to bool 'true' or 'false'
|
|
|
|
4819, # The file contains a character that cannot be represented in the current code page
|
2016-05-10 04:09:41 +00:00
|
|
|
4838, # (atlgdi.h) conversion from 'int' to 'UINT' requires a narrowing conversion
|
2014-06-27 03:04:58 +00:00
|
|
|
4996, # (atlapp.h) 'GetVersionExW': was declared deprecated
|
2013-07-01 09:58:01 +00:00
|
|
|
],
|
|
|
|
},
|
2013-06-19 13:31:57 +00:00
|
|
|
'conditions': [
|
2013-11-19 12:43:30 +00:00
|
|
|
# The breakdpad on Windows assumes Debug_x64 and Release_x64 configurations.
|
|
|
|
['OS=="win"', {
|
|
|
|
'target_defaults': {
|
|
|
|
'configurations': {
|
|
|
|
'Debug_x64': {
|
|
|
|
},
|
|
|
|
'Release_x64': {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}], # OS=="win"
|
2014-01-21 12:34:35 +00:00
|
|
|
# The breakdpad on Mac assumes Release_Base configuration.
|
|
|
|
['OS=="mac"', {
|
|
|
|
'target_defaults': {
|
|
|
|
'configurations': {
|
|
|
|
'Release_Base': {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}], # OS=="mac"
|
2013-06-19 13:31:57 +00:00
|
|
|
],
|
|
|
|
}
|