{ # '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)', }, # Putting these explicitly here so not to be dependant on common.gypi. 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], 'xcode_settings': { 'WARNING_CFLAGS': [ '-Wall', '-Wendif-labels', '-W', '-Wno-unused-parameter', '-Werror=undefined-inline', ], }, 'conditions': [ ['clang==1', { 'cflags': [ '-Werror=undefined-inline', ] }], [ 'node_shared=="false"', { 'msvs_settings': { 'VCManifestTool': { 'EmbedManifest': 'true', 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest' } }, }, { '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', ], }, { # POSIX 'defines': [ '__POSIX__' ], }], [ 'node_enable_d8=="true"', { 'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ], }], [ 'node_use_bundled_v8=="true"', { 'conditions': [ [ 'build_v8_with_gn=="true"', { 'dependencies': ['deps/v8/gypfiles/v8-monolithic.gyp:v8_monolith'], }, { 'dependencies': [ 'deps/v8/gypfiles/v8.gyp:v8', 'deps/v8/gypfiles/v8.gyp:v8_libplatform', ], }], ], }], [ 'node_use_bundled_v8=="false"', { 'libraries' : [ '