Skip to content

Commit

Permalink
nwjs master
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Sep 21, 2018
1 parent a9c418f commit fa530a8
Show file tree
Hide file tree
Showing 4,064 changed files with 1,500 additions and 474,742 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
212 changes: 169 additions & 43 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,25 @@
'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_debug_lib': 'false',
'node_module_version%': '',
'node_with_ltcg%': '',
'node_use_pch%': 'false',

'build_v8_with_gn': 'false',
'openssl_no_asm': 1,
'mac_product_name': 'nwjs',
'enable_lto': 'false',

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

'openssl_fips%': '',
'openssl_fips': '',
'llvm_version': '6.0',

# Default to -O0 for debug builds.
'v8_optimized_debug%': 0,
Expand All @@ -33,9 +40,12 @@

# 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,

# Disable V8 untrusted code mitigations.
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
Expand All @@ -47,21 +57,12 @@

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

'conditions': [
['GENERATOR=="ninja"', {
'obj_dir': '<(PRODUCT_DIR)/obj',
'conditions': [
[ 'build_v8_with_gn=="true"', {
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/v8_monolith.gen/gn/obj/libv8_monolith.a',
}, {
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/gypfiles/libv8_base.a',
}],
]
}, {
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/obj.target/deps/v8/gypfiles/libv8_base.a',
}],
['OS == "win"', {
'os_posix': 0,
'v8_postmortem_support%': 'false',
Expand All @@ -70,10 +71,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" and <(building_nw)==1', {
'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_sid_i386-sysroot',
}],
['OS == "mac"', {
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
['OS=="linux" and target_arch=="x64" and <(building_nw)==1', {
'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_sid_amd64-sysroot',
}],
['OS== "mac"', {
'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',
}],
],
}],
['build_v8_with_gn == "true"', {
'conditions': [
Expand All @@ -97,10 +115,113 @@
],
},

'conditions': [
[ 'clang==1 and OS != "mac" and building_nw==1', {
'make_global_settings': [
['CC', '<(clang_dir)/bin/clang'],
['CXX', '<(clang_dir)/bin/clang++'],
['CC.host', '$(CC)'],
['CXX.host', '$(CXX)'],
],
}],
[ 'OS == "win" and building_nw==1', {
'make_global_settings': [
['LD', 'third_party/llvm-build/Release+Asserts/bin/lld-link.exe'],
],
}],
],
'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 @@ -127,23 +248,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 @@ -161,7 +269,8 @@
'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os
},
},
'Release': {
'Release_Base': {
'abstract': 1,
'variables': {
'v8_enable_handle_zapping': 0,
},
Expand Down Expand Up @@ -192,14 +301,14 @@
'cflags': [ '-fPIE' ],
'ldflags': [ '-fPIE', '-pie' ]
}],
['node_shared=="true"', {
['node_shared=="true_disable"', {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 2 # MultiThreadedDLL (/MD)
}
}
}],
['node_shared=="false"', {
['node_shared=="false_disable"', {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0 # MultiThreaded (/MT)
Expand Down Expand Up @@ -238,6 +347,7 @@
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': '<(win_release_RuntimeLibrary)', # static release
'Optimization': 3, # /Ox, full optimization
'FavorSizeOrSpeed': 1, # /Ot, favor speed over size
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
Expand All @@ -250,7 +360,19 @@
],
}
}
}
},
'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 @@ -298,15 +420,15 @@
}],
],
'GenerateDebugInformation': 'true',
'GenerateMapFile': 'true', # /MAP
'MapExports': 'true', # /MAPINFO:EXPORTS
'GenerateMapFile': 'false', # /MAP
'MapExports': 'false', # /MAPINFO:EXPORTS
'RandomizedBaseAddress': 2, # enable ASLR
'DataExecutionPrevention': 2, # enable DEP
'AllowIsolation': 'true',
'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 @@ -347,7 +469,7 @@
'_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',
],
}],
Expand Down Expand Up @@ -382,6 +504,10 @@
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'building_nw==1', {
'cflags': [ '--sysroot=<(sysroot)', '-nostdinc++', '-isystem<(DEPTH)/buildtools/third_party/libc++/trunk/include', '-isystem<(DEPTH)/buildtools/third_party/libc++abi/trunk/include' ],
'ldflags': [ '--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))', '-nostdlib++' ],
}],
[ 'target_arch=="ppc" and OS!="aix"', {
'cflags': [ '-m32' ],
'ldflags': [ '-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 @@ -114,6 +117,7 @@
[ 'OS=="win"', {
'defines': [ 'CARES_PULL_WS2TCPIP_H=1' ],
'include_dirs': [ 'config/win32' ],
'msvs_disabled_warnings': [4133],
'sources': [
'src/config-win32.h',
'src/windows_port.c',
Expand Down
Loading

0 comments on commit fa530a8

Please sign in to comment.