electron/common.gypi

266 lines
9.7 KiB
Text
Raw Normal View History

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',
2015-04-01 12:26:46 +00:00
'vendor/brightray/brightray.gypi',
],
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,
# Reflects node's config.gypi.
2013-12-09 15:18:36 +00:00
'component%': 'static_library',
'python': 'python',
2015-06-29 04:18:50 +00:00
'openssl_fips': '',
2015-04-07 09:26:21 +00:00
'openssl_no_asm': 1,
'node_release_urlbase': 'https://atom.io/download/atom-shell',
'node_byteorder': '<!(python -c "import sys; print sys.byteorder")',
2015-06-10 06:11:34 +00:00
'node_target_type': 'shared_library',
'node_install_npm': 'false',
'node_prefix': '',
'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',
'node_shared_v8': 'true',
'node_shared_zlib': 'false',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_mdb': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'uv_library': 'static_library',
'uv_parent_path': 'vendor/node/deps/uv',
'uv_use_dtrace': 'false',
2015-06-10 08:30:47 +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',
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': [
2015-04-07 09:26:21 +00:00
['_target_name in ["libuv", "http_parser", "openssl", "cares", "node", "zlib"]', {
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 *'
4189, #
4131, # uses old-style declarator
4133, # incompatible types
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
2013-07-01 09:58:01 +00:00
4389, # '==' : signed/unsigned mismatch
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',
},
},
'xcode_settings': {
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
'WARNING_CFLAGS': [
'-Wno-unknown-warning-option',
'-Wno-parentheses-equality',
'-Wno-unused-function',
'-Wno-sometimes-uninitialized',
'-Wno-pointer-sign',
2015-04-07 09:26:21 +00:00
'-Wno-sign-compare',
'-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',
],
},
'conditions': [
['OS=="linux"', {
'cflags': [
'-Wno-parentheses-equality',
'-Wno-unused-function',
'-Wno-sometimes-uninitialized',
'-Wno-pointer-sign',
'-Wno-string-plus-int',
'-Wno-unused-variable',
2014-02-20 10:58:56 +00:00
'-Wno-unused-value',
'-Wno-deprecated-declarations',
'-Wno-return-type',
2015-09-02 09:31:08 +00:00
'-Wno-shift-negative-value',
2015-04-10 04:07:53 +00:00
# Required when building as shared library.
'-fPIC',
],
}],
],
2013-07-01 09:58:01 +00:00
}],
2015-04-01 12:26:46 +00:00
['_target_name=="node"', {
2015-06-10 06:11:34 +00:00
'include_dirs': [
'<(libchromiumcontent_src_dir)/v8',
'<(libchromiumcontent_src_dir)/v8/include',
],
2015-04-10 04:07:53 +00:00
'conditions': [
2015-04-10 05:24:58 +00:00
['OS=="mac" and libchromiumcontent_component==0', {
2015-04-10 07:35:25 +00:00
# -all_load is the "whole-archive" on OS X.
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"', {
2015-04-10 07:35:25 +00:00
'libraries': [ '-lwinmm.lib' ],
2015-04-11 11:51:11 +00:00
'conditions': [
['libchromiumcontent_component==0', {
'variables': {
'conditions': [
['target_arch=="ia32"', {
'reference_symbols': [
2015-04-22 04:08:04 +00:00
'_u_errorName_54',
'_ubidi_setPara_54',
'_ucsdet_getName_54',
'_uidna_openUTS46_54',
'_ulocdata_close_54',
'_unorm_normalize_54',
'_uregex_matches_54',
'_uscript_getCode_54',
'_usearch_setPattern_54',
'?createInstance@Transliterator@icu_54@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z',
2015-04-11 11:51:11 +00:00
],
}, {
'reference_symbols': [
2015-04-22 02:12:16 +00:00
'u_errorName_54',
'ubidi_setPara_54',
'ucsdet_getName_54',
'uidna_openUTS46_54',
'ulocdata_close_54',
'unorm_normalize_54',
'uregex_matches_54',
'uscript_getCode_54',
'usearch_setPattern_54',
'?createInstance@Transliterator@icu_54@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z',
2015-04-11 11:51:11 +00:00
],
}],
],
},
'msvs_settings': {
'VCLinkerTool': {
# There is nothing like "whole-archive" on Windows, so we
# have to manually force some objets files to be included
# by referencing them.
'ForceSymbolReferences': [ '<@(reference_symbols)' ], # '/INCLUDE'
},
},
}],
],
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',
],
}, {
'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
}],
],
2015-04-01 12:26: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',
],
}],
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"
],
}],
['_target_name.startswith("breakpad") or _target_name in ["crash_report_sender", "dump_syms"]', {
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'WARNING_CFLAGS': [
'-Wno-deprecated-declarations',
2014-05-09 02:04:13 +00:00
'-Wno-deprecated-register',
'-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"
],
}],
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
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
4503, # decorated name length exceeded, name was truncated
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
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
],
}