Skip to content

Commit

Permalink
nwjs master
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Sep 28, 2017
1 parent b48ff2a commit 39bcff5
Show file tree
Hide file tree
Showing 4,029 changed files with 1,452 additions and 448,561 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
203 changes: 151 additions & 52 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,34 @@
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
'python%': 'python',

'node_shared%': 'false',
'node_shared%': 'true',
'force_dynamic_crt%': 0,
'node_use_v8_platform%': 'true',
'node_use_bundled_v8%': 'true',
'node_module_version%': '',
'mac_product_name': 'nwjs',

'node_tag%': '',
'uv_library%': 'static_library',

'openssl_fips%': '',
'openssl_fips': '',

# Default to -O0 for debug builds.
'v8_optimized_debug%': 0,

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
'v8_host_byteorder': '<!(python -c "import sys; print sys.byteorder")',

# Don't bake anything extra into the snapshot.
'v8_use_external_startup_data%': 0,
'v8_use_external_startup_data': 1,
'v8_enable_i18n_support%': 1,
#'icu_use_data_file_flag%': 1,
'win_fastlink': 0,

# Don't use ICU data file (icudtl.dat) from V8, we use our own.
'icu_use_data_file_flag%': 0,

'conditions': [
['GENERATOR=="ninja"', {
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
}, {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
}],
['OS == "win"', {
'os_posix': 0,
'v8_postmortem_support%': 'false',
Expand All @@ -50,10 +47,27 @@
}, {
'os_posix': 1,
'v8_postmortem_support%': 'true',
'clang_dir': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts',
}],
['OS=="linux" and target_arch=="ia32"', {
'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_i386-sysroot',
}],
['OS=="linux" and target_arch=="x64"', {
'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_amd64-sysroot',
}],
['OS== "mac"', {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
'OBJ_DIR': '<(PRODUCT_DIR)/obj.target',
#'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
}, {
'conditions': [
['GENERATOR=="ninja"', {
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
}, {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
}],
],
}],
['openssl_fips != ""', {
'OPENSSL_PRODUCT': 'libcrypto.a',
Expand All @@ -68,10 +82,108 @@
],
},

'conditions': [
[ 'clang==1 and OS != "mac"', {
'make_global_settings': [
['CC', '<(clang_dir)/bin/clang'],
['CXX', '<(clang_dir)/bin/clang++'],
['CC.host', '$(CC)'],
['CXX.host', '$(CXX)'],
],
}],
],
'target_defaults': {
'default_configuration': 'Release',
'variables': {
'conditions': [
['OS=="win" and component=="shared_library"', {
# See http://msdn.microsoft.com/en-us/library/aa652367.aspx
'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
}, {
# See http://msdn.microsoft.com/en-us/library/aa652367.aspx
'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
}],
],
},
'configurations': {
'Debug': {
'Common_Base': {
'abstract': 1,
'msvs_settings':{
'VCCLCompilerTool': {
'AdditionalOptions': [
'/bigobj',
# Tell the compiler to crash on failures. This is undocumented
# and unsupported but very handy.
'/d2FastFail',
],
},
'VCLinkerTool': {
# Add the default import libs.
'AdditionalDependencies': [
'kernel32.lib',
'gdi32.lib',
'winspool.lib',
'comdlg32.lib',
'advapi32.lib',
'shell32.lib',
'ole32.lib',
'oleaut32.lib',
'user32.lib',
'uuid.lib',
'odbc32.lib',
'odbccp32.lib',
'delayimp.lib',
'credui.lib',
'dbghelp.lib',
'shlwapi.lib',
'winmm.lib',
],
'AdditionalOptions': [
# Suggested by Microsoft Devrel to avoid
# LINK : fatal error LNK1248: image size (80000000) exceeds maximum allowable size (80000000)
# which started happening more regularly after VS2013 Update 4.
# Needs to be a bit lower for VS2015, or else errors out.
'/maxilksize:0x7ff00000',
# Tell the linker to crash on failures.
'/fastfail',
],
},
},
'conditions': [
['OS=="win" and win_fastlink==1 and MSVS_VERSION != "2013"', {
'msvs_settings': {
'VCLinkerTool': {
# /PROFILE is incompatible with /debug:fastlink
'Profile': 'false',
'AdditionalOptions': [
# Tell VS 2015+ to create a PDB that references debug
# information in .obj and .lib files instead of copying
# it all.
'/DEBUG:FASTLINK',
],
},
},
}],
['OS=="win" and MSVS_VERSION == "2015"', {
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
'/Zc:sizedDealloc-',
# Disable thread-safe statics to avoid overhead and because
# they are disabled on other platforms. See crbug.com/587210
# and -fno-threadsafe-statics.
'/Zc:threadSafeInit-',
],
},
},
}],
],
},
'Debug_Base': {
'abstract': 1,
'variables': {
'v8_enable_handle_zapping': 1,
},
Expand All @@ -89,23 +201,10 @@
'cflags': [ '-fPIE' ],
'ldflags': [ '-fPIE', '-pie' ]
}],
['node_shared=="true"', {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 3, # MultiThreadedDebugDLL (/MDd)
}
}
}],
['node_shared=="false"', {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1 # MultiThreadedDebug (/MTd)
}
}
}]
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', # static debug
'Optimization': 0, # /Od, no optimization
'MinimalRebuild': 'false',
'OmitFramePointers': 'false',
Expand All @@ -119,7 +218,8 @@
'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os
},
},
'Release': {
'Release_Base': {
'abstract': 1,
'variables': {
'v8_enable_handle_zapping': 0,
},
Expand All @@ -139,23 +239,10 @@
'cflags': [ '-fPIE' ],
'ldflags': [ '-fPIE', '-pie' ]
}],
['node_shared=="true"', {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 2 # MultiThreadedDLL (/MD)
}
}
}],
['node_shared=="false"', {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0 # MultiThreaded (/MT)
}
}
}]
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': '<(win_release_RuntimeLibrary)', # static release
'Optimization': 3, # /Ox, full optimization
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
Expand All @@ -180,7 +267,19 @@
'LinkIncremental': 1, # disable incremental linking
},
},
}
},
'Debug': {
'inherit_from': ['Common_Base', 'Debug_Base'],
},
'Release': {
'inherit_from': ['Common_Base', 'Release_Base'],
},
'conditions': [
[ 'OS=="win"', {
'Debug_x64': { 'inherit_from': ['Debug'] },
'Release_x64': { 'inherit_from': ['Release'], },
}],
],
},
# Forcibly disable -Werror. We support a wide range of compilers, it's
# simply not feasible to squelch all warnings, never mind that the
Expand Down Expand Up @@ -230,7 +329,7 @@
'SuppressStartupBanner': 'true',
},
},
'msvs_disabled_warnings': [4351, 4355, 4800],
'msvs_disabled_warnings': [4351, 4355, 4800, 4595],
'conditions': [
['asan == 1 and OS != "mac"', {
'cflags+': [
Expand Down Expand Up @@ -271,13 +370,13 @@
'_CRT_NONSTDC_NO_DEPRECATE',
# Make sure the STL doesn't try to use exceptions
'_HAS_EXCEPTIONS=0',
'BUILDING_V8_SHARED=1',
#'BUILDING_V8_SHARED=1',
'BUILDING_UV_SHARED=1',
],
}],
[ 'OS in "linux freebsd openbsd solaris aix"', {
'cflags': [ '-pthread', ],
'ldflags': [ '-pthread' ],
'cflags': [ '-pthread'],
'ldflags': [ '-pthread'],
}],
[ 'OS in "linux freebsd openbsd solaris android aix"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
Expand All @@ -294,16 +393,16 @@
],
'conditions': [
[ 'target_arch=="ia32"', {
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
'cflags': [ '-m32', '--sysroot=<(sysroot)' ],
'ldflags': [ '-m32','--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))' ],
}],
[ 'target_arch=="x32"', {
'cflags': [ '-mx32' ],
'ldflags': [ '-mx32' ],
}],
[ 'target_arch=="x64"', {
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
'cflags': [ '-m64', '--sysroot=<(sysroot)' ],
'ldflags': [ '-m64', '--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))' ],
}],
[ 'target_arch=="ppc" and OS!="aix"', {
'cflags': [ '-m32' ],
Expand Down
41 changes: 41 additions & 0 deletions config.gypi
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Do not edit. Generated by the configure script.
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': ['OPENSSL_NO_SSL2=1'],
'include_dirs': [],
'libraries': []},
'variables': { 'clang': 1,
'gcc_version': 49,
'host_arch': 'x64',
'icu_small': 'false',
'node_install_npm': 'true',
'node_prefix': '',
'node_shared': 'true',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'debug_http2': 0,
'debug_nghttp2': 0,
'node_shared_openssl': 'false',
'node_shared_v8': 'false',
'node_shared_zlib': 'false',
'node_tag': '',
'node_release_urlbase': '',
'node_byteorder': 'little',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_mdb': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'openssl_no_asm': 0,
'python': '/usr/bin/python',
'target_arch': 'x64',
'uv_library': 'static_library',
'uv_parent_path': '/deps/uv/',
'uv_use_dtrace': 'false',
'v8_enable_gdbjit': 0,
'v8_enable_i18n_support': 0,
'v8_no_strict_aliasing': 1,
'v8_optimized_debug': 0,
'v8_random_seed': 0,
'v8_use_snapshot': 'true',
'want_separate_host_toolset': 0}}
4 changes: 4 additions & 0 deletions deps/cares/cares.gyp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
'variables': {
'library%': 'static_library',
},
'target_defaults': {
'conditions': [
['OS!="win"', {
Expand Down Expand Up @@ -112,6 +115,7 @@
}],
[ 'OS=="win"', {
'include_dirs': [ 'config/win32' ],
'msvs_disabled_warnings': [4133],
'sources': [
'src/config-win32.h',
'src/windows_port.c',
Expand Down
9 changes: 9 additions & 0 deletions deps/cares/src/ares_create_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

#include "ares_setup.h"

#ifndef _WIN32
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warray-bounds"
#endif

#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
Expand Down Expand Up @@ -200,3 +205,7 @@ int ares_create_query(const char *name, int dnsclass, int type,

return ARES_SUCCESS;
}

#ifndef _WIN32
#pragma clang diagnostic pop
#endif
Loading

0 comments on commit 39bcff5

Please sign in to comment.