Back to home page

EIC code displayed by LXR

 
 

    


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