{ # 'force_load' means to include the static libs into the shared lib or # executable. Therefore, it is enabled when building: # 1. The executable and it uses static lib (cctest and node) # 2. The shared lib # Linker optimizes out functions that are not used. When force_load=true, # --whole-archive,force_load and /WHOLEARCHIVE are used to include # all obj files in static libs into the executable or shared lib. 'variables': { 'variables': { 'variables': { 'force_load%': 'true', 'current_type%': '<(_type)', }, 'force_load%': '<(force_load)', 'conditions': [ ['current_type=="static_library"', { 'force_load': 'false', }], [ 'current_type=="executable" and node_target_type=="shared_library"', { 'force_load': 'false', }] ], }, 'force_load%': '<(force_load)', }, 'conditions': [ [ 'clang==1', { 'cflags': [ '-Werror=undefined-inline', ] }], [ 'node_shared=="false" and "<(_type)"=="executable"', { 'msvs_settings': { 'VCManifestTool': { 'EmbedManifest': 'true', 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest' } }, }], [ 'node_shared=="true"', { 'defines': [ 'NODE_SHARED_MODE', ], }], [ 'OS=="win"', { 'defines!': [ 'NODE_PLATFORM="win"', ], 'defines': [ 'FD_SETSIZE=1024', # we need to use node's preferred "win32" rather than gyp's preferred "win" 'NODE_PLATFORM="win32"', # Stop from defining macros that conflict with # std::min() and std::max(). We don't use (much) # but we still inherit it from uv.h. 'NOMINMAX', '_UNICODE=1', ], 'msvs_precompiled_header': 'tools/msvs/pch/node_pch.h', 'msvs_precompiled_source': 'tools/msvs/pch/node_pch.cc', 'sources': [ '<(_msvs_precompiled_header)', '<(_msvs_precompiled_source)', ], }, { # POSIX 'defines': [ '__POSIX__' ], }], [ 'node_enable_d8=="true"', { 'dependencies': [ 'tools/v8_gypfiles/d8.gyp:d8' ], }], [ 'node_use_bundled_v8=="false" and target_arch=="arm" and OS=="android"', { 'libraries': [ '