Warning, /include/node/common.gypi is written in an unsupported language. File is not indexed.
0001 {
0002 'variables': {
0003 'configuring_node%': 0,
0004 'asan%': 0,
0005 'ubsan%': 0,
0006 'visibility%': 'hidden', # V8's visibility setting
0007 'target_arch%': 'ia32', # set v8's target architecture
0008 'host_arch%': 'ia32', # set v8's host architecture
0009 'want_separate_host_toolset%': 0, # V8 should not build target and host
0010 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
0011 'component%': 'static_library', # NB. these names match with what V8 expects
0012 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
0013 'enable_pgo_generate%': '0',
0014 'enable_pgo_use%': '0',
0015 'python%': 'python',
0016
0017 'node_shared%': 'false',
0018 'force_dynamic_crt%': 0,
0019 'node_use_v8_platform%': 'true',
0020 'node_use_bundled_v8%': 'true',
0021 'node_module_version%': '',
0022 'node_with_ltcg%': '',
0023 'node_shared_openssl%': 'false',
0024
0025 'node_tag%': '',
0026 'uv_library%': 'static_library',
0027
0028 'clang%': 0,
0029 'error_on_warn%': 'false',
0030 'suppress_all_error_on_warn%': 'false',
0031 'control_flow_guard%': 'false',
0032
0033 'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
0034 'openssl_no_asm%': 0,
0035
0036 # Don't use ICU data file (icudtl.dat) from V8, we use our own.
0037 'icu_use_data_file_flag%': 0,
0038
0039 # Reset this number to 0 on major V8 upgrades.
0040 # Increment by one for each non-official patch applied to deps/v8.
0041 'v8_embedder_string': '-node.26',
0042
0043 ##### V8 defaults for Node.js #####
0044
0045 # Turn on SipHash for hash seed generation, addresses HashWick
0046 'v8_use_siphash': 'true',
0047
0048 # These are more relevant for V8 internal development.
0049 # Refs: https://github.com/nodejs/node/issues/23122
0050 # Refs: https://github.com/nodejs/node/issues/23167
0051 # Enable compiler warnings when using V8_DEPRECATED apis from V8 code.
0052 'v8_deprecation_warnings': 0,
0053 # Enable compiler warnings when using V8_DEPRECATE_SOON apis from V8 code.
0054 'v8_imminent_deprecation_warnings': 0,
0055
0056 # Enable disassembler for `--print-code` v8 options
0057 'v8_enable_disassembler': 1,
0058
0059 # Sets -dOBJECT_PRINT.
0060 'v8_enable_object_print%': 1,
0061
0062 # https://github.com/nodejs/node/pull/22920/files#r222779926
0063 'v8_enable_handle_zapping': 0,
0064
0065 # Disable pointer compression. Can be enabled at build time via configure
0066 # options but default values are required here as this file is also used by
0067 # node-gyp to build addons.
0068 'v8_enable_pointer_compression%': 0,
0069 'v8_enable_31bit_smis_on_64bit_arch%': 0,
0070
0071 # Disable v8 hugepage by default.
0072 'v8_enable_hugepage%': 0,
0073
0074 # This is more of a V8 dev setting
0075 # https://github.com/nodejs/node/pull/22920/files#r222779926
0076 'v8_enable_fast_mksnapshot': 0,
0077
0078 'v8_win64_unwinding_info': 1,
0079
0080 # Variables controlling external defines exposed in public headers.
0081 'v8_enable_conservative_stack_scanning%': 0,
0082 'v8_enable_direct_local%': 0,
0083 'v8_enable_map_packing%': 0,
0084 'v8_enable_pointer_compression_shared_cage%': 0,
0085 'v8_enable_sandbox%': 0,
0086 'v8_enable_v8_checks%': 0,
0087 'v8_enable_zone_compression%': 0,
0088 'v8_use_perfetto': 0,
0089 'tsan%': 0,
0090
0091 ##### end V8 defaults #####
0092
0093 'conditions': [
0094 ['OS == "win"', {
0095 'os_posix': 0,
0096 'v8_postmortem_support%': 0,
0097 'obj_dir': '<(PRODUCT_DIR)/obj',
0098 'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a',
0099 }, {
0100 'os_posix': 1,
0101 'v8_postmortem_support%': 1,
0102 }],
0103 ['GENERATOR == "ninja"', {
0104 'obj_dir': '<(PRODUCT_DIR)/obj',
0105 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a',
0106 }, {
0107 'obj_dir%': '<(PRODUCT_DIR)/obj.target',
0108 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a',
0109 }],
0110 ['OS=="mac"', {
0111 'obj_dir%': '<(PRODUCT_DIR)/obj.target',
0112 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a',
0113 }],
0114 # V8 pointer compression only supports 64bit architectures.
0115 ['target_arch in "arm ia32 mips mipsel ppc"', {
0116 'v8_enable_pointer_compression': 0,
0117 'v8_enable_31bit_smis_on_64bit_arch': 0,
0118 'v8_enable_sandbox': 0
0119 }],
0120 ['target_arch in "ppc64 s390x"', {
0121 'v8_enable_backtrace': 1,
0122 }],
0123 ['OS=="linux"', {
0124 'node_section_ordering_info%': ''
0125 }],
0126 ['OS == "zos"', {
0127 # use ICU data file on z/OS
0128 'icu_use_data_file_flag%': 1
0129 }]
0130 ],
0131 },
0132
0133 'target_defaults': {
0134 'default_configuration': 'Release',
0135 'configurations': {
0136 'Debug': {
0137 'variables': {
0138 'v8_enable_handle_zapping': 1,
0139 'conditions': [
0140 ['node_shared != "true"', {
0141 'MSVC_runtimeType': 1, # MultiThreadedDebug (/MTd)
0142 }, {
0143 'MSVC_runtimeType': 3, # MultiThreadedDebugDLL (/MDd)
0144 }],
0145 ],
0146 },
0147 'defines': [ 'DEBUG', '_DEBUG' ],
0148 'cflags': [ '-g', '-O0' ],
0149 'conditions': [
0150 ['OS in "aix os400"', {
0151 'cflags': [ '-gxcoff' ],
0152 'ldflags': [ '-Wl,-bbigtoc' ],
0153 }],
0154 ['OS == "android"', {
0155 'cflags': [ '-fPIC' ],
0156 'ldflags': [ '-fPIC' ]
0157 }],
0158 ['clang==1', {
0159 'msbuild_toolset': 'ClangCL',
0160 }],
0161 ],
0162 'msvs_settings': {
0163 'VCCLCompilerTool': {
0164 'BasicRuntimeChecks': 3, # /RTC1
0165 'MinimalRebuild': 'false',
0166 'OmitFramePointers': 'false',
0167 'Optimization': 0, # /Od, no optimization
0168 'RuntimeLibrary': '<(MSVC_runtimeType)',
0169 },
0170 'VCLinkerTool': {
0171 'LinkIncremental': 2, # enable incremental linking
0172 },
0173 },
0174 'xcode_settings': {
0175 'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os
0176 },
0177 },
0178 'Release': {
0179 'variables': {
0180 'v8_enable_handle_zapping': 0,
0181 'pgo_generate': ' -fprofile-generate ',
0182 'pgo_use': ' -fprofile-use -fprofile-correction ',
0183 'conditions': [
0184 ['node_shared != "true"', {
0185 'MSVC_runtimeType': 0 # MultiThreaded (/MT)
0186 }, {
0187 'MSVC_runtimeType': 2 # MultiThreadedDLL (/MD)
0188 }],
0189 ['clang==1', {
0190 'lto': ' -flto ', # Clang
0191 }, {
0192 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', # GCC
0193 }],
0194 ],
0195 },
0196 'cflags': [ '-O3' ],
0197 'conditions': [
0198 ['enable_lto=="true"', {
0199 'cflags': ['<(lto)'],
0200 'ldflags': ['<(lto)'],
0201 'xcode_settings': {
0202 'LLVM_LTO': 'YES',
0203 },
0204 }],
0205 ['OS=="linux"', {
0206 'conditions': [
0207 ['node_section_ordering_info!=""', {
0208 'cflags': [
0209 '-fuse-ld=gold',
0210 '-ffunction-sections',
0211 ],
0212 'ldflags': [
0213 '-fuse-ld=gold',
0214 '-Wl,--section-ordering-file=<(node_section_ordering_info)',
0215 ],
0216 }],
0217 ],
0218 }],
0219 ['OS=="solaris"', {
0220 # pull in V8's postmortem metadata
0221 'ldflags': [ '-Wl,-z,allextract' ]
0222 }],
0223 ['OS=="zos"', {
0224 # increase performance, number from experimentation
0225 'cflags': [ '-qINLINE=::150:100000' ]
0226 }],
0227 ['OS!="mac" and OS!="win" and OS!="zos"', {
0228 # -fno-omit-frame-pointer is necessary for the --perf_basic_prof
0229 # flag to work correctly. perf(1) gets confused about JS stack
0230 # frames otherwise, even with --call-graph dwarf.
0231 'cflags': [ '-fno-omit-frame-pointer' ],
0232 }],
0233 ['OS=="linux"', {
0234 'conditions': [
0235 ['enable_pgo_generate=="true"', {
0236 'cflags': ['<(pgo_generate)'],
0237 'ldflags': ['<(pgo_generate)'],
0238 },],
0239 ['enable_pgo_use=="true"', {
0240 'cflags': ['<(pgo_use)'],
0241 'ldflags': ['<(pgo_use)'],
0242 },],
0243 ],
0244 },],
0245 ['OS == "android"', {
0246 'cflags': [ '-fPIC', '-I<(android_ndk_path)/sources/android/cpufeatures' ],
0247 'ldflags': [ '-fPIC' ]
0248 }],
0249 ['clang==1', {
0250 'msbuild_toolset': 'ClangCL',
0251 }],
0252 ],
0253 'msvs_settings': {
0254 'VCCLCompilerTool': {
0255 'conditions': [
0256 ['target_arch=="arm64"', {
0257 'FloatingPointModel': 1 # /fp:strict
0258 }]
0259 ],
0260 'EnableFunctionLevelLinking': 'true',
0261 'EnableIntrinsicFunctions': 'true',
0262 'FavorSizeOrSpeed': 1, # /Ot, favor speed over size
0263 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
0264 'OmitFramePointers': 'true',
0265 'Optimization': 3, # /Ox, full optimization
0266 'RuntimeLibrary': '<(MSVC_runtimeType)',
0267 'RuntimeTypeInfo': 'false',
0268 }
0269 },
0270 'xcode_settings': {
0271 'GCC_OPTIMIZATION_LEVEL': '3', # stop gyp from defaulting to -Os
0272 },
0273 }
0274 },
0275
0276 # Defines these mostly for node-gyp to pickup.
0277 'defines': [
0278 '_GLIBCXX_USE_CXX11_ABI=1',
0279 ],
0280
0281 # Forcibly disable -Werror. We support a wide range of compilers, it's
0282 # simply not feasible to squelch all warnings, never mind that the
0283 # libraries in deps/ are not under our control.
0284 'conditions': [
0285 [ 'error_on_warn=="false"', {
0286 'cflags!': ['-Werror'],
0287 }, '(_target_name!="<(node_lib_target_name)" or '
0288 '_target_name!="<(node_core_target_name)")', {
0289 'cflags!': ['-Werror'],
0290 }],
0291 ],
0292 'msvs_settings': {
0293 'VCCLCompilerTool': {
0294 # TODO(targos): Remove condition and always use LanguageStandard options
0295 # once node-gyp supports them.
0296 'conditions': [
0297 ['clang==1', {
0298 'LanguageStandard': 'stdcpp20',
0299 'LanguageStandard_C': 'stdc11',
0300 'AdditionalOptions': [
0301 '/Zc:__cplusplus',
0302 # The following option reduces the "error C1060: compiler is out of heap space"
0303 '/Zm2000',
0304 ],
0305 }, {
0306 'AdditionalOptions': [
0307 '/Zc:__cplusplus',
0308 # The following option enables c++20 on Windows. This is needed for V8 v12.4+
0309 '-std:c++20',
0310 # The following option reduces the "error C1060: compiler is out of heap space"
0311 '/Zm2000',
0312 ],
0313 }],
0314 ['control_flow_guard=="true"', {
0315 'AdditionalOptions': [
0316 '/guard:cf', # Control Flow Guard
0317 ],
0318 }],
0319 ],
0320 'BufferSecurityCheck': 'true',
0321 'DebugInformationFormat': 1, # /Z7 embed info in .obj files
0322 'ExceptionHandling': 0, # /EHsc
0323 'MultiProcessorCompilation': 'true',
0324 'StringPooling': 'true', # pool string literals
0325 'SuppressStartupBanner': 'true',
0326 'WarnAsError': 'false',
0327 'WarningLevel': 3, # /W3
0328 },
0329 'VCLinkerTool': {
0330 'target_conditions': [
0331 ['_type=="executable"', {
0332 'SubSystem': 1, # /SUBSYSTEM:CONSOLE
0333 }],
0334 ],
0335 'conditions': [
0336 ['target_arch=="ia32"', {
0337 'TargetMachine' : 1, # /MACHINE:X86
0338 }],
0339 ['target_arch=="x64"', {
0340 'TargetMachine' : 17, # /MACHINE:X64
0341 }],
0342 ['target_arch=="arm64"', {
0343 'TargetMachine' : 0, # NotSet. MACHINE:ARM64 is inferred from the input files.
0344 }],
0345 ['control_flow_guard=="true"', {
0346 'AdditionalOptions': [
0347 '/guard:cf', # Control Flow Guard
0348 ],
0349 }],
0350 ],
0351 'GenerateDebugInformation': 'true',
0352 'SuppressStartupBanner': 'true',
0353 },
0354 },
0355 # Disable warnings:
0356 # - "C4251: class needs to have dll-interface"
0357 # - "C4275: non-DLL-interface used as base for DLL-interface"
0358 # Over 10k of these warnings are generated when compiling node,
0359 # originating from v8.h. Most of them are false positives.
0360 # See also: https://github.com/nodejs/node/pull/15570
0361 # TODO: re-enable when Visual Studio fixes these upstream.
0362 #
0363 # - "C4267: conversion from 'size_t' to 'int'"
0364 # Many any originate from our dependencies, and their sheer number
0365 # drowns out other, more legitimate warnings.
0366 # - "C4244: conversion from 'type1' to 'type2', possible loss of data"
0367 # Ususaly safe. Disable for `dep`, enable for `src`
0368 'msvs_disabled_warnings': [4351, 4355, 4800, 4251, 4275, 4244, 4267],
0369 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
0370
0371 'conditions': [
0372 [ 'configuring_node', {
0373 'msvs_configuration_attributes': {
0374 'OutputDirectory': '<(DEPTH)/out/$(Configuration)/',
0375 'IntermediateDirectory': '$(OutDir)obj/$(ProjectName)/'
0376 },
0377 }],
0378 [ 'target_arch=="x64"', {
0379 'msvs_configuration_platform': 'x64',
0380 }],
0381 [ 'target_arch=="arm64"', {
0382 'msvs_configuration_platform': 'arm64',
0383 }],
0384 ['asan == 1 and OS != "mac" and OS != "zos"', {
0385 'cflags+': [
0386 '-fno-omit-frame-pointer',
0387 '-fsanitize=address',
0388 '-fsanitize-address-use-after-scope',
0389 ],
0390 'defines': [ 'LEAK_SANITIZER', 'V8_USE_ADDRESS_SANITIZER' ],
0391 'cflags!': [ '-fomit-frame-pointer' ],
0392 'ldflags': [ '-fsanitize=address' ],
0393 }],
0394 ['asan == 1 and OS == "mac"', {
0395 'xcode_settings': {
0396 'OTHER_CFLAGS+': [
0397 '-fno-omit-frame-pointer',
0398 '-gline-tables-only',
0399 '-fsanitize=address',
0400 '-DLEAK_SANITIZER'
0401 ],
0402 'OTHER_CFLAGS!': [
0403 '-fomit-frame-pointer',
0404 ],
0405 },
0406 'target_conditions': [
0407 ['_type!="static_library"', {
0408 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']},
0409 }],
0410 ],
0411 }],
0412 ['ubsan == 1 and OS != "mac" and OS != "zos"', {
0413 'cflags+': [
0414 '-fno-omit-frame-pointer',
0415 '-fsanitize=undefined',
0416 ],
0417 'defines': [ 'UNDEFINED_SANITIZER'],
0418 'cflags!': [ '-fno-omit-frame-pointer' ],
0419 'ldflags': [ '-fsanitize=undefined' ],
0420 }],
0421 ['ubsan == 1 and OS == "mac"', {
0422 'xcode_settings': {
0423 'OTHER_CFLAGS+': [
0424 '-fno-omit-frame-pointer',
0425 '-fsanitize=undefined',
0426 '-DUNDEFINED_SANITIZER'
0427 ],
0428 },
0429 'target_conditions': [
0430 ['_type!="static_library"', {
0431 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=undefined']},
0432 }],
0433 ],
0434 }],
0435 # The defines bellow must include all things from the external_v8_defines
0436 # list in v8/BUILD.gn.
0437 ['v8_enable_v8_checks == 1', {
0438 'defines': ['V8_ENABLE_CHECKS'],
0439 }],
0440 ['v8_enable_pointer_compression == 1', {
0441 'defines': ['V8_COMPRESS_POINTERS'],
0442 }],
0443 ['v8_enable_pointer_compression_shared_cage == 1', {
0444 'defines': ['V8_COMPRESS_POINTERS_IN_SHARED_CAGE'],
0445 }],
0446 ['v8_enable_pointer_compression == 1 and v8_enable_pointer_compression_shared_cage != 1', {
0447 'defines': ['V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE'],
0448 }],
0449 ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', {
0450 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
0451 }],
0452 ['v8_enable_zone_compression == 1', {
0453 'defines': ['V8_COMPRESS_ZONES',],
0454 }],
0455 ['v8_enable_sandbox == 1', {
0456 'defines': ['V8_ENABLE_SANDBOX',],
0457 }],
0458 ['v8_deprecation_warnings == 1', {
0459 'defines': ['V8_DEPRECATION_WARNINGS',],
0460 }],
0461 ['v8_imminent_deprecation_warnings == 1', {
0462 'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',],
0463 }],
0464 ['v8_use_perfetto == 1', {
0465 'defines': ['V8_USE_PERFETTO',],
0466 }],
0467 ['v8_enable_map_packing == 1', {
0468 'defines': ['V8_MAP_PACKING',],
0469 }],
0470 ['tsan == 1', {
0471 'defines': ['V8_IS_TSAN',],
0472 }],
0473 ['v8_enable_conservative_stack_scanning == 1', {
0474 'defines': ['V8_ENABLE_CONSERVATIVE_STACK_SCANNING',],
0475 }],
0476 ['v8_enable_direct_local == 1', {
0477 'defines': ['V8_ENABLE_DIRECT_LOCAL',],
0478 }],
0479 ['OS == "win"', {
0480 'defines': [
0481 'WIN32',
0482 # we don't really want VC++ warning us about
0483 # how dangerous C functions are...
0484 '_CRT_SECURE_NO_DEPRECATE',
0485 # ... or that C implementations shouldn't use
0486 # POSIX names
0487 '_CRT_NONSTDC_NO_DEPRECATE',
0488 # Make sure the STL doesn't try to use exceptions
0489 '_HAS_EXCEPTIONS=0',
0490 'BUILDING_V8_SHARED=1',
0491 'BUILDING_UV_SHARED=1',
0492 # Stop <windows.h> from defining macros that conflict with
0493 # std::min() and std::max(). We don't use <windows.h> (much)
0494 # but we still inherit it from uv.h.
0495 'NOMINMAX',
0496 ],
0497 }],
0498 [ 'OS in "linux freebsd openbsd solaris aix os400"', {
0499 'cflags': [ '-pthread' ],
0500 'ldflags': [ '-pthread' ],
0501 }],
0502 [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
0503 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
0504 'cflags_cc': [
0505 '-fno-rtti',
0506 '-fno-exceptions',
0507 '-fno-strict-aliasing',
0508 '-std=gnu++17',
0509 ],
0510 'defines': [ '__STDC_FORMAT_MACROS' ],
0511 'ldflags': [ '-rdynamic' ],
0512 'target_conditions': [
0513 # The 1990s toolchain on SmartOS can't handle thin archives.
0514 ['_type=="static_library" and OS=="solaris"', {
0515 'standalone_static_library': 1,
0516 }],
0517 ['OS=="openbsd"', {
0518 'cflags': [ '-I/usr/local/include' ],
0519 'ldflags': [ '-Wl,-z,wxneeded' ],
0520 }],
0521 ['_toolset=="host"', {
0522 'conditions': [
0523 [ 'host_arch=="ia32"', {
0524 'cflags': [ '-m32' ],
0525 'ldflags': [ '-m32' ],
0526 }],
0527 [ 'host_arch=="x64"', {
0528 'cflags': [ '-m64' ],
0529 'ldflags': [ '-m64' ],
0530 }],
0531 [ 'host_arch=="ppc" and OS not in "aix os400"', {
0532 'cflags': [ '-m32' ],
0533 'ldflags': [ '-m32' ],
0534 }],
0535 [ 'host_arch=="ppc64" and OS not in "aix os400"', {
0536 'cflags': [ '-m64', '-mminimal-toc' ],
0537 'ldflags': [ '-m64' ],
0538 }],
0539 [ 'host_arch=="s390x" and OS=="linux"', {
0540 'cflags': [ '-m64', '-march=z196' ],
0541 'ldflags': [ '-m64', '-march=z196' ],
0542 }],
0543 ],
0544 }],
0545 ['_toolset=="target"', {
0546 'conditions': [
0547 [ 'target_arch=="ia32"', {
0548 'cflags': [ '-m32' ],
0549 'ldflags': [ '-m32' ],
0550 }],
0551 [ 'target_arch=="x64"', {
0552 'cflags': [ '-m64' ],
0553 'ldflags': [ '-m64' ],
0554 }],
0555 [ 'target_arch=="ppc" and OS not in "aix os400"', {
0556 'cflags': [ '-m32' ],
0557 'ldflags': [ '-m32' ],
0558 }],
0559 [ 'target_arch=="ppc64" and OS not in "aix os400"', {
0560 'cflags': [ '-m64', '-mminimal-toc' ],
0561 'ldflags': [ '-m64' ],
0562 }],
0563 [ 'target_arch=="s390x" and OS=="linux"', {
0564 'cflags': [ '-m64', '-march=z196' ],
0565 'ldflags': [ '-m64', '-march=z196' ],
0566 }],
0567 ],
0568 }],
0569 ],
0570 'conditions': [
0571 [ 'OS=="solaris"', {
0572 'cflags': [ '-pthreads' ],
0573 'ldflags': [ '-pthreads' ],
0574 'cflags!': [ '-pthread' ],
0575 'ldflags!': [ '-pthread' ],
0576 }],
0577 [ 'node_shared=="true"', {
0578 'cflags': [ '-fPIC' ],
0579 }],
0580 ],
0581 }],
0582 [ 'OS in "aix os400"', {
0583 'variables': {
0584 # Used to differentiate `AIX` and `OS400`(IBM i).
0585 'aix_variant_name': '<!(uname -s)',
0586 },
0587 'cflags': [ '-maix64', ],
0588 'ldflags!': [ '-rdynamic', ],
0589 'ldflags': [
0590 '-Wl,-bbigtoc',
0591 '-maix64',
0592 ],
0593 'conditions': [
0594 [ '"<(aix_variant_name)"=="OS400"', { # a.k.a. `IBM i`
0595 'ldflags': [
0596 '-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib',
0597 '-Wl,-brtl',
0598 ],
0599 }, { # else it's `AIX`
0600 'variables': {
0601 'gcc_major': '<!(<(python) -c "import os; import subprocess; CXX=os.environ.get(\'CXX\', \'g++\'); subprocess.run([CXX, \'-dumpversion\'])")'
0602 },
0603 # Disable the following compiler warning:
0604 #
0605 # warning: visibility attribute not supported in this
0606 # configuration; ignored [-Wattributes]
0607 #
0608 # This is gcc complaining about __attribute((visibility("default"))
0609 # in static library builds. Legitimate but harmless and it drowns
0610 # out more relevant warnings.
0611 'cflags': [ '-Wno-attributes' ],
0612 'ldflags': [
0613 '-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/>(gcc_major)/pthread/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/>(gcc_major)/pthread/ppc64:/opt/freeware/lib/pthread/ppc64',
0614 ],
0615 }],
0616 ],
0617 }],
0618 ['OS=="android"', {
0619 'target_conditions': [
0620 ['_toolset=="target"', {
0621 'defines': [ '_GLIBCXX_USE_C99_MATH' ],
0622 'libraries': [ '-llog' ],
0623 }],
0624 ['_toolset=="host"', {
0625 'cflags': [ '-pthread' ],
0626 'ldflags': [ '-pthread' ],
0627 }],
0628 ],
0629 }],
0630 ['OS=="mac"', {
0631 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
0632 'xcode_settings': {
0633 'ALWAYS_SEARCH_USER_PATHS': 'NO',
0634 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
0635 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
0636 # (Equivalent to -fPIC)
0637 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
0638 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
0639 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
0640 'GCC_STRICT_ALIASING': 'NO', # -fno-strict-aliasing
0641 'PREBINDING': 'NO', # No -Wl,-prebind
0642 'MACOSX_DEPLOYMENT_TARGET': '11.0', # -mmacosx-version-min=11.0
0643 'USE_HEADERMAP': 'NO',
0644 'WARNING_CFLAGS': [
0645 '-Wall',
0646 '-Wendif-labels',
0647 '-W',
0648 '-Wno-unused-parameter',
0649 ],
0650 },
0651 'target_conditions': [
0652 ['_type!="static_library"', {
0653 'xcode_settings': {
0654 'OTHER_LDFLAGS': [
0655 '-Wl,-search_paths_first'
0656 ],
0657 },
0658 }],
0659 ],
0660 'conditions': [
0661 ['target_arch=="ia32"', {
0662 'xcode_settings': {'ARCHS': ['i386']},
0663 }],
0664 ['target_arch=="x64"', {
0665 'xcode_settings': {'ARCHS': ['x86_64']},
0666 }],
0667 ['target_arch=="arm64"', {
0668 'xcode_settings': {
0669 'ARCHS': ['arm64'],
0670 'OTHER_LDFLAGS!': [
0671 '-Wl,-no_pie',
0672 ],
0673 },
0674 }],
0675 ['clang==1', {
0676 'xcode_settings': {
0677 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
0678 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17
0679 'CLANG_CXX_LIBRARY': 'libc++',
0680 },
0681 }],
0682 ],
0683 }],
0684 ['OS=="freebsd"', {
0685 'ldflags': [
0686 '-Wl,--export-dynamic',
0687 ],
0688 }],
0689 # if node is built as an executable,
0690 # the openssl mechanism for keeping itself "dload"-ed to ensure proper
0691 # atexit cleanup does not apply
0692 ['node_shared_openssl!="true" and node_shared!="true"', {
0693 'defines': [
0694 # `OPENSSL_NO_PINSHARED` prevents openssl from dload
0695 # current node executable,
0696 # see https://github.com/nodejs/node/pull/21848
0697 # or https://github.com/nodejs/node/issues/27925
0698 'OPENSSL_NO_PINSHARED'
0699 ],
0700 }],
0701 ['node_shared_openssl!="true"', {
0702 # `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures.
0703 'defines': [
0704 'OPENSSL_THREADS',
0705 ],
0706 }],
0707 ['node_shared_openssl!="true" and openssl_no_asm==1', {
0708 'defines': [
0709 'OPENSSL_NO_ASM',
0710 ],
0711 }],
0712 ['OS == "zos"', {
0713 'defines': [
0714 '_XOPEN_SOURCE_EXTENDED',
0715 '_XOPEN_SOURCE=600',
0716 '_UNIX03_THREADS',
0717 '_UNIX03_WITHDRAWN',
0718 '_UNIX03_SOURCE',
0719 '_OPEN_SYS_SOCK_IPV6',
0720 '_OPEN_SYS_FILE_EXT=1',
0721 '_POSIX_SOURCE',
0722 '_OPEN_SYS',
0723 '_OPEN_SYS_IF_EXT',
0724 '_OPEN_SYS_SOCK_IPV6',
0725 '_OPEN_MSGQ_EXT',
0726 '_LARGE_TIME_API',
0727 '_ALL_SOURCE',
0728 '_AE_BIMODAL=1',
0729 '__IBMCPP_TR1__',
0730 'NODE_PLATFORM="os390"',
0731 'PATH_MAX=1024',
0732 '_ENHANCED_ASCII_EXT=0xFFFFFFFF',
0733 '_Export=extern',
0734 '__static_assert=static_assert',
0735 ],
0736 'cflags': [
0737 '-q64',
0738 '-Wc,DLL',
0739 '-Wa,GOFF',
0740 '-qARCH=10',
0741 '-qASCII',
0742 '-qTUNE=12',
0743 '-qENUM=INT',
0744 '-qEXPORTALL',
0745 '-qASM',
0746 ],
0747 'cflags_cc': [
0748 '-qxclang=-std=c++14',
0749 ],
0750 'ldflags': [
0751 '-q64',
0752 ],
0753 # for addons due to v8config.h include of "zos-base.h":
0754 'include_dirs': ['<(zoslib_include_dir)'],
0755 }],
0756 ],
0757 }
0758 }