Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/node/common.gypi
$ cat -n /usr/include/node/common.gypi 1 { 2 'variables': { 3 'configuring_node%': 0, 4 'asan%': 0, 5 'ubsan%': 0, 6 'visibility%': 'hidden', # V8's visibility setting 7 'target_arch%': 'ia32', # set v8's target architecture 8 'host_arch%': 'ia32', # set v8's host architecture 9 'want_separate_host_toolset%': 0, # V8 should not build target and host 10 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds 11 'component%': 'static_library', # NB. these names match with what V8 expects 12 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way 13 'enable_pgo_generate%': '0', 14 'enable_pgo_use%': '0', 15 'python%': 'python', 16 17 'node_shared%': 'false', 18 'force_dynamic_crt%': 0, 19 'node_use_v8_platform%': 'true', 20 'node_use_bundled_v8%': 'true', 21 'node_module_version%': '', 22 'node_with_ltcg%': '', 23 'node_shared_openssl%': 'false', 24 25 'node_tag%': '', 26 'uv_library%': 'static_library', 27 28 'clang%': 0, 29 'error_on_warn%': 'false', 30 'suppress_all_error_on_warn%': 'false', 31 'control_flow_guard%': 'false', 32 33 'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)', 34 'openssl_no_asm%': 0, 35 36 # Don't use ICU data file (icudtl.dat) from V8, we use our own. 37 'icu_use_data_file_flag%': 0, 38 39 # Reset this number to 0 on major V8 upgrades. 40 # Increment by one for each non-official patch applied to deps/v8. 41 'v8_embedder_string': '-node.33', 42 43 ##### V8 defaults for Node.js ##### 44 45 # Turn on SipHash for hash seed generation, addresses HashWick 46 'v8_use_siphash': 'true', 47 48 # These are more relevant for V8 internal development. 49 # Refs: https://github.com/nodejs/node/issues/23122 50 # Refs: https://github.com/nodejs/node/issues/23167 51 # Enable compiler warnings when using V8_DEPRECATED apis from V8 code. 52 'v8_deprecation_warnings': 0, 53 # Enable compiler warnings when using V8_DEPRECATE_SOON apis from V8 code. 54 'v8_imminent_deprecation_warnings': 0, 55 56 # Enable disassembler for `--print-code` v8 options 57 'v8_enable_disassembler': 1, 58 59 # Sets -dOBJECT_PRINT. 60 'v8_enable_object_print%': 1, 61 62 # https://github.com/nodejs/node/pull/22920/files#r222779926 63 'v8_enable_handle_zapping': 0, 64 65 # Disable pointer compression. Can be enabled at build time via configure 66 # options but default values are required here as this file is also used by 67 # node-gyp to build addons. 68 'v8_enable_pointer_compression%': 0, 69 'v8_enable_31bit_smis_on_64bit_arch%': 0, 70 71 # Disable v8 hugepage by default. 72 'v8_enable_hugepage%': 0, 73 74 # This is more of a V8 dev setting 75 # https://github.com/nodejs/node/pull/22920/files#r222779926 76 'v8_enable_fast_mksnapshot': 0, 77 78 'v8_win64_unwinding_info': 1, 79 80 # Variables controlling external defines exposed in public headers. 81 'v8_enable_conservative_stack_scanning%': 0, 82 'v8_enable_direct_local%': 0, 83 'v8_enable_map_packing%': 0, 84 'v8_enable_pointer_compression_shared_cage%': 0, 85 'v8_enable_external_code_space%': 0, 86 'v8_enable_sandbox%': 0, 87 'v8_enable_v8_checks%': 0, 88 'v8_enable_zone_compression%': 0, 89 'v8_use_perfetto': 0, 90 'tsan%': 0, 91 92 ##### end V8 defaults ##### 93 94 'conditions': [ 95 ['OS == "win"', { 96 'os_posix': 0, 97 'v8_postmortem_support%': 0, 98 'obj_dir': '<(PRODUCT_DIR)/obj', 99 'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a', 100 }, { 101 'os_posix': 1, 102 'v8_postmortem_support%': 1, 103 }], 104 ['GENERATOR == "ninja"', { 105 'obj_dir': '<(PRODUCT_DIR)/obj', 106 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a', 107 }, { 108 'obj_dir%': '<(PRODUCT_DIR)/obj.target', 109 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a', 110 }], 111 ['OS=="mac"', { 112 'obj_dir%': '<(PRODUCT_DIR)/obj.target', 113 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', 114 }], 115 # V8 pointer compression only supports 64bit architectures. 116 ['target_arch in "arm ia32 mips mipsel ppc"', { 117 'v8_enable_pointer_compression': 0, 118 'v8_enable_pointer_compression_shared_cage': 0, 119 'v8_enable_31bit_smis_on_64bit_arch': 0, 120 'v8_enable_external_code_space': 0, 121 'v8_enable_sandbox': 0 122 }], 123 ['target_arch in "ppc64 s390x"', { 124 'v8_enable_backtrace': 1, 125 }], 126 ['OS=="linux" or OS=="openharmony"', { 127 'node_section_ordering_info%': '' 128 }], 129 ['OS == "zos"', { 130 # use ICU data file on z/OS 131 'icu_use_data_file_flag%': 1 132 }] 133 ], 134 }, 135 136 'target_defaults': { 137 'default_configuration': 'Release', 138 'configurations': { 139 'Debug': { 140 'variables': { 141 'v8_enable_handle_zapping': 1, 142 'conditions': [ 143 ['node_shared != "true"', { 144 'MSVC_runtimeType': 1, # MultiThreadedDebug (/MTd) 145 }, { 146 'MSVC_runtimeType': 3, # MultiThreadedDebugDLL (/MDd) 147 }], 148 ], 149 }, 150 'defines': [ 'DEBUG', '_DEBUG' ], 151 'cflags': [ '-g', '-O0' ], 152 'conditions': [ 153 ['OS in "aix os400"', { 154 'cflags': [ '-gxcoff' ], 155 'ldflags': [ '-Wl,-bbigtoc' ], 156 }], 157 ['OS == "android"', { 158 'cflags': [ '-fPIC' ], 159 'ldflags': [ '-fPIC' ] 160 }], 161 ['clang==1', { 162 'msbuild_toolset': 'ClangCL', 163 }], 164 ], 165 'msvs_settings': { 166 'VCCLCompilerTool': { 167 'BasicRuntimeChecks': 3, # /RTC1 168 'MinimalRebuild': 'false', 169 'OmitFramePointers': 'false', 170 'Optimization': 0, # /Od, no optimization 171 'RuntimeLibrary': '<(MSVC_runtimeType)', 172 }, 173 'VCLinkerTool': { 174 'LinkIncremental': 2, # enable incremental linking 175 }, 176 }, 177 'xcode_settings': { 178 'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os 179 }, 180 }, 181 'Release': { 182 'variables': { 183 'v8_enable_handle_zapping': 0, 184 'pgo_generate': ' -fprofile-generate ', 185 'pgo_use': ' -fprofile-use -fprofile-correction ', 186 'conditions': [ 187 ['node_shared != "true"', { 188 'MSVC_runtimeType': 0 # MultiThreaded (/MT) 189 }, { 190 'MSVC_runtimeType': 2 # MultiThreadedDLL (/MD) 191 }], 192 ['clang==1', { 193 'lto': ' -flto ', # Clang 194 }, { 195 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', # GCC 196 }], 197 ], 198 }, 199 'cflags': [ '-O3' ], 200 'conditions': [ 201 ['enable_lto=="true"', { 202 'cflags': ['<(lto)'], 203 'ldflags': ['<(lto)'], 204 'xcode_settings': { 205 'LLVM_LTO': 'YES', 206 }, 207 }], 208 ['OS=="linux" or OS=="openharmony"', { 209 'conditions': [ 210 ['node_section_ordering_info!=""', { 211 'cflags': [ 212 '-fuse-ld=gold', 213 '-ffunction-sections', 214 ], 215 'ldflags': [ 216 '-fuse-ld=gold', 217 '-Wl,--section-ordering-file=<(node_section_ordering_info)', 218 ], 219 }], 220 ], 221 }], 222 ['OS=="solaris"', { 223 # pull in V8's postmortem metadata 224 'ldflags': [ '-Wl,-z,allextract' ] 225 }], 226 ['OS=="zos"', { 227 # increase performance, number from experimentation 228 'cflags': [ '-qINLINE=::150:100000' ] 229 }], 230 ['OS!="mac" and OS!="win" and OS!="zos"', { 231 # -fno-omit-frame-pointer is necessary for the --perf_basic_prof 232 # flag to work correctly. perf(1) gets confused about JS stack 233 # frames otherwise, even with --call-graph dwarf. 234 'cflags': [ '-fno-omit-frame-pointer' ], 235 }], 236 ['OS=="linux" or OS=="openharmony"', { 237 'conditions': [ 238 ['enable_pgo_generate=="true"', { 239 'cflags': ['<(pgo_generate)'], 240 'ldflags': ['<(pgo_generate)'], 241 },], 242 ['enable_pgo_use=="true"', { 243 'cflags': ['<(pgo_use)'], 244 'ldflags': ['<(pgo_use)'], 245 },], 246 ], 247 },], 248 ['OS == "android"', { 249 'cflags': [ '-fPIC', '-I<(android_ndk_path)/sources/android/cpufeatures' ], 250 'ldflags': [ '-fPIC' ] 251 }], 252 ['clang==1', { 253 'msbuild_toolset': 'ClangCL', 254 }], 255 ], 256 'msvs_settings': { 257 'VCCLCompilerTool': { 258 'conditions': [ 259 ['target_arch=="arm64"', { 260 'FloatingPointModel': 1 # /fp:strict 261 }] 262 ], 263 'EnableFunctionLevelLinking': 'true', 264 'EnableIntrinsicFunctions': 'true', 265 'FavorSizeOrSpeed': 1, # /Ot, favor speed over size 266 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible 267 'OmitFramePointers': 'true', 268 'Optimization': 3, # /Ox, full optimization 269 'RuntimeLibrary': '<(MSVC_runtimeType)', 270 'RuntimeTypeInfo': 'false', 271 } 272 }, 273 'xcode_settings': { 274 'GCC_OPTIMIZATION_LEVEL': '3', # stop gyp from defaulting to -Os 275 }, 276 } 277 }, 278 279 # Defines these mostly for node-gyp to pickup. 280 'defines': [ 281 '_GLIBCXX_USE_CXX11_ABI=1', 282 # This help forks when building Node.js on a 32-bit arch as 283 # libuv is always compiled with _FILE_OFFSET_BITS=64 284 '_FILE_OFFSET_BITS=64' 285 ], 286 287 # Forcibly disable -Werror. We support a wide range of compilers, it's 288 # simply not feasible to squelch all warnings, never mind that the 289 # libraries in deps/ are not under our control. 290 'conditions': [ 291 [ 'error_on_warn=="false"', { 292 'cflags!': ['-Werror'], 293 }, '(_target_name!="<(node_lib_target_name)" or ' 294 '_target_name!="<(node_core_target_name)")', { 295 'cflags!': ['-Werror'], 296 }], 297 ], 298 'msvs_settings': { 299 'VCCLCompilerTool': { 300 # TODO(targos): Remove condition and always use LanguageStandard options 301 # once node-gyp supports them. 302 'conditions': [ 303 ['clang==1', { 304 'LanguageStandard': 'stdcpp20', 305 'LanguageStandard_C': 'stdc11', 306 'AdditionalOptions': [ 307 '/Zc:__cplusplus', 308 # The following option reduces the "error C1060: compiler is out of heap space" 309 '/Zm2000', 310 ], 311 }, { 312 'AdditionalOptions': [ 313 '/Zc:__cplusplus', 314 # The following option enables c++20 on Windows. This is needed for V8 v12.4+ 315 '-std:c++20', 316 # The following option reduces the "error C1060: compiler is out of heap space" 317 '/Zm2000', 318 ], 319 }], 320 ['control_flow_guard=="true"', { 321 'AdditionalOptions': [ 322 '/guard:cf', # Control Flow Guard 323 ], 324 }], 325 ], 326 'BufferSecurityCheck': 'true', 327 'DebugInformationFormat': 1, # /Z7 embed info in .obj files 328 'ExceptionHandling': 0, # /EHsc 329 'MultiProcessorCompilation': 'true', 330 'StringPooling': 'true', # pool string literals 331 'SuppressStartupBanner': 'true', 332 'WarnAsError': 'false', 333 'WarningLevel': 3, # /W3 334 }, 335 'VCLinkerTool': { 336 'target_conditions': [ 337 ['_type=="executable"', { 338 'SubSystem': 1, # /SUBSYSTEM:CONSOLE 339 }], 340 ], 341 'conditions': [ 342 ['target_arch=="ia32"', { 343 'TargetMachine' : 1, # /MACHINE:X86 344 }], 345 ['target_arch=="x64"', { 346 'TargetMachine' : 17, # /MACHINE:X64 347 }], 348 ['target_arch=="arm64"', { 349 'TargetMachine' : 0, # NotSet. MACHINE:ARM64 is inferred from the input files. 350 }], 351 ['control_flow_guard=="true"', { 352 'AdditionalOptions': [ 353 '/guard:cf', # Control Flow Guard 354 ], 355 }], 356 ], 357 'GenerateDebugInformation': 'true', 358 'SuppressStartupBanner': 'true', 359 }, 360 }, 361 # Disable warnings: 362 # - "C4251: class needs to have dll-interface" 363 # - "C4275: non-DLL-interface used as base for DLL-interface" 364 # Over 10k of these warnings are generated when compiling node, 365 # originating from v8.h. Most of them are false positives. 366 # See also: https://github.com/nodejs/node/pull/15570 367 # TODO: re-enable when Visual Studio fixes these upstream. 368 # 369 # - "C4267: conversion from 'size_t' to 'int'" 370 # Many any originate from our dependencies, and their sheer number 371 # drowns out other, more legitimate warnings. 372 # - "C4244: conversion from 'type1' to 'type2', possible loss of data" 373 # Ususaly safe. Disable for `dep`, enable for `src` 374 'msvs_disabled_warnings': [4351, 4355, 4800, 4251, 4275, 4244, 4267], 375 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin 376 377 'conditions': [ 378 [ 'configuring_node', { 379 'msvs_configuration_attributes': { 380 'OutputDirectory': '<(DEPTH)/out/$(Configuration)/', 381 'IntermediateDirectory': '$(OutDir)obj/$(ProjectName)/' 382 }, 383 }], 384 [ 'target_arch=="x64"', { 385 'msvs_configuration_platform': 'x64', 386 }], 387 [ 'target_arch=="arm64"', { 388 'msvs_configuration_platform': 'arm64', 389 }], 390 ['asan == 1 and OS != "mac" and OS != "zos"', { 391 'cflags+': [ 392 '-fno-omit-frame-pointer', 393 '-fsanitize=address', 394 '-fsanitize-address-use-after-scope', 395 ], 396 'defines': [ 'LEAK_SANITIZER', 'V8_USE_ADDRESS_SANITIZER' ], 397 'cflags!': [ '-fomit-frame-pointer' ], 398 'ldflags': [ '-fsanitize=address' ], 399 }], 400 ['asan == 1 and OS == "mac"', { 401 'xcode_settings': { 402 'OTHER_CFLAGS+': [ 403 '-fno-omit-frame-pointer', 404 '-gline-tables-only', 405 '-fsanitize=address', 406 '-DLEAK_SANITIZER' 407 ], 408 'OTHER_CFLAGS!': [ 409 '-fomit-frame-pointer', 410 ], 411 }, 412 'target_conditions': [ 413 ['_type!="static_library"', { 414 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, 415 }], 416 ], 417 }], 418 ['ubsan == 1 and OS != "mac" and OS != "zos"', { 419 'cflags+': [ 420 '-fno-omit-frame-pointer', 421 '-fsanitize=undefined', 422 ], 423 'defines': [ 'UNDEFINED_SANITIZER'], 424 'cflags!': [ '-fno-omit-frame-pointer' ], 425 'ldflags': [ '-fsanitize=undefined' ], 426 }], 427 ['ubsan == 1 and OS == "mac"', { 428 'xcode_settings': { 429 'OTHER_CFLAGS+': [ 430 '-fno-omit-frame-pointer', 431 '-fsanitize=undefined', 432 '-DUNDEFINED_SANITIZER' 433 ], 434 }, 435 'target_conditions': [ 436 ['_type!="static_library"', { 437 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=undefined']}, 438 }], 439 ], 440 }], 441 # The defines bellow must include all things from the external_v8_defines 442 # list in v8/BUILD.gn. 443 ['v8_enable_v8_checks == 1', { 444 'defines': ['V8_ENABLE_CHECKS'], 445 }], 446 ['v8_enable_pointer_compression == 1', { 447 'defines': ['V8_COMPRESS_POINTERS'], 448 }], 449 ['v8_enable_pointer_compression_shared_cage == 1', { 450 'defines': ['V8_COMPRESS_POINTERS_IN_SHARED_CAGE'], 451 }], 452 ['v8_enable_pointer_compression == 1 and v8_enable_pointer_compression_shared_cage != 1', { 453 'defines': ['V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE'], 454 }], 455 ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', { 456 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], 457 }], 458 ['v8_enable_zone_compression == 1', { 459 'defines': ['V8_COMPRESS_ZONES',], 460 }], 461 ['v8_enable_sandbox == 1', { 462 'defines': ['V8_ENABLE_SANDBOX',], 463 }], 464 ['v8_enable_external_code_space == 1', { 465 'defines': ['V8_EXTERNAL_CODE_SPACE',], 466 }], 467 ['v8_deprecation_warnings == 1', { 468 'defines': ['V8_DEPRECATION_WARNINGS',], 469 }], 470 ['v8_imminent_deprecation_warnings == 1', { 471 'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',], 472 }], 473 ['v8_use_perfetto == 1', { 474 'defines': ['V8_USE_PERFETTO',], 475 }], 476 ['v8_enable_map_packing == 1', { 477 'defines': ['V8_MAP_PACKING',], 478 }], 479 ['tsan == 1', { 480 'defines': ['V8_IS_TSAN',], 481 }], 482 ['v8_enable_conservative_stack_scanning == 1', { 483 'defines': ['V8_ENABLE_CONSERVATIVE_STACK_SCANNING',], 484 }], 485 ['v8_enable_direct_local == 1', { 486 'defines': ['V8_ENABLE_DIRECT_LOCAL',], 487 }], 488 ['OS == "win"', { 489 'defines': [ 490 'WIN32', 491 # we don't really want VC++ warning us about 492 # how dangerous C functions are... 493 '_CRT_SECURE_NO_DEPRECATE', 494 # ... or that C implementations shouldn't use 495 # POSIX names 496 '_CRT_NONSTDC_NO_DEPRECATE', 497 # Make sure the STL doesn't try to use exceptions 498 '_HAS_EXCEPTIONS=0', 499 'BUILDING_V8_SHARED=1', 500 'BUILDING_UV_SHARED=1', 501 # Stop
from defining macros that conflict with 502 # std::min() and std::max(). We don't use
(much) 503 # but we still inherit it from uv.h. 504 'NOMINMAX', 505 ], 506 }], 507 [ 'OS in "linux freebsd openbsd solaris aix os400 openharmony"', { 508 'cflags': [ '-pthread' ], 509 'ldflags': [ '-pthread' ], 510 }], 511 [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi openharmony"', { 512 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], 513 'cflags_cc': [ 514 '-fno-rtti', 515 '-fno-exceptions', 516 '-fno-strict-aliasing', 517 '-std=gnu++17', 518 ], 519 'defines': [ '__STDC_FORMAT_MACROS' ], 520 'ldflags': [ '-rdynamic' ], 521 'target_conditions': [ 522 # The 1990s toolchain on SmartOS can't handle thin archives. 523 ['_type=="static_library" and OS=="solaris"', { 524 'standalone_static_library': 1, 525 }], 526 ['OS=="openbsd"', { 527 'cflags': [ '-I/usr/local/include' ], 528 'ldflags': [ '-Wl,-z,wxneeded' ], 529 }], 530 ['_toolset=="host"', { 531 'conditions': [ 532 [ 'host_arch=="ia32"', { 533 'cflags': [ '-m32' ], 534 'ldflags': [ '-m32' ], 535 }], 536 [ 'host_arch=="x64"', { 537 'cflags': [ '-m64' ], 538 'ldflags': [ '-m64' ], 539 }], 540 [ 'host_arch=="ppc" and OS not in "aix os400"', { 541 'cflags': [ '-m32' ], 542 'ldflags': [ '-m32' ], 543 }], 544 [ 'host_arch=="ppc64" and OS not in "aix os400"', { 545 'conditions': [ 546 [ 'clang==0', { 547 'cflags': [ '-mminimal-toc' ], 548 }], 549 ], 550 'cflags': [ '-m64' ], 551 'ldflags': [ '-m64' ], 552 }], 553 [ 'host_arch=="s390x" and OS=="linux"', { 554 'cflags': [ '-m64', '-march=z196' ], 555 'ldflags': [ '-m64', '-march=z196' ], 556 }], 557 ], 558 }], 559 ['_toolset=="target"', { 560 'conditions': [ 561 [ 'target_arch=="ia32"', { 562 'cflags': [ '-m32' ], 563 'ldflags': [ '-m32' ], 564 }], 565 [ 'target_arch=="x64"', { 566 'cflags': [ '-m64' ], 567 'ldflags': [ '-m64' ], 568 }], 569 [ 'target_arch=="ppc" and OS not in "aix os400"', { 570 'cflags': [ '-m32' ], 571 'ldflags': [ '-m32' ], 572 }], 573 [ 'target_arch=="ppc64" and OS not in "aix os400"', { 574 'conditions': [ 575 [ 'clang==0', { 576 'cflags': [ '-mminimal-toc' ], 577 }], 578 ], 579 'cflags': [ '-m64' ], 580 'ldflags': [ '-m64' ], 581 }], 582 [ 'target_arch=="s390x" and OS=="linux"', { 583 'cflags': [ '-m64', '-march=z196' ], 584 'ldflags': [ '-m64', '-march=z196' ], 585 }], 586 ], 587 }], 588 ], 589 'conditions': [ 590 [ 'OS=="solaris"', { 591 'cflags': [ '-pthreads' ], 592 'ldflags': [ '-pthreads' ], 593 'cflags!': [ '-pthread' ], 594 'ldflags!': [ '-pthread' ], 595 }], 596 [ 'node_shared=="true"', { 597 'cflags': [ '-fPIC' ], 598 }], 599 ], 600 }], 601 [ 'OS in "aix os400"', { 602 'variables': { 603 # Used to differentiate `AIX` and `OS400`(IBM i). 604 'aix_variant_name': '(gcc_major)/pthread/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/>(gcc_major)/pthread/ppc64:/opt/freeware/lib/pthread/ppc64', 633 ], 634 }], 635 ], 636 }], 637 ['OS=="android"', { 638 'target_conditions': [ 639 ['_toolset=="target"', { 640 'defines': [ '_GLIBCXX_USE_C99_MATH' ], 641 'libraries': [ '-llog' ], 642 }], 643 ['_toolset=="host"', { 644 'cflags': [ '-pthread' ], 645 'ldflags': [ '-pthread' ], 646 }], 647 ], 648 }], 649 ['OS=="mac"', { 650 'defines': ['_DARWIN_USE_64_BIT_INODE=1'], 651 'xcode_settings': { 652 'ALWAYS_SEARCH_USER_PATHS': 'NO', 653 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks 654 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic 655 # (Equivalent to -fPIC) 656 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions 657 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti 658 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings 659 'GCC_STRICT_ALIASING': 'NO', # -fno-strict-aliasing 660 'PREBINDING': 'NO', # No -Wl,-prebind 661 'MACOSX_DEPLOYMENT_TARGET': '11.0', # -mmacosx-version-min=11.0 662 'USE_HEADERMAP': 'NO', 663 'WARNING_CFLAGS': [ 664 '-Wall', 665 '-Wendif-labels', 666 '-W', 667 '-Wno-unused-parameter', 668 ], 669 }, 670 'target_conditions': [ 671 ['_type!="static_library"', { 672 'xcode_settings': { 673 'OTHER_LDFLAGS': [ 674 '-Wl,-search_paths_first' 675 ], 676 }, 677 }], 678 ], 679 'conditions': [ 680 ['target_arch=="ia32"', { 681 'xcode_settings': {'ARCHS': ['i386']}, 682 }], 683 ['target_arch=="x64"', { 684 'xcode_settings': {'ARCHS': ['x86_64']}, 685 }], 686 ['target_arch=="arm64"', { 687 'xcode_settings': { 688 'ARCHS': ['arm64'], 689 'OTHER_LDFLAGS!': [ 690 '-Wl,-no_pie', 691 ], 692 }, 693 }], 694 ['clang==1', { 695 'xcode_settings': { 696 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 697 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17 698 'CLANG_CXX_LIBRARY': 'libc++', 699 }, 700 }], 701 ], 702 }], 703 ['OS=="freebsd"', { 704 'ldflags': [ 705 '-Wl,--export-dynamic', 706 ], 707 }], 708 # if node is built as an executable, 709 # the openssl mechanism for keeping itself "dload"-ed to ensure proper 710 # atexit cleanup does not apply 711 ['node_shared_openssl!="true" and node_shared!="true"', { 712 'defines': [ 713 # `OPENSSL_NO_PINSHARED` prevents openssl from dload 714 # current node executable, 715 # see https://github.com/nodejs/node/pull/21848 716 # or https://github.com/nodejs/node/issues/27925 717 'OPENSSL_NO_PINSHARED' 718 ], 719 }], 720 ['node_shared_openssl!="true"', { 721 # `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures. 722 'defines': [ 723 'OPENSSL_THREADS', 724 ], 725 }], 726 ['node_shared_openssl!="true" and openssl_no_asm==1', { 727 'defines': [ 728 'OPENSSL_NO_ASM', 729 ], 730 }], 731 ['OS == "zos"', { 732 'defines': [ 733 '_XOPEN_SOURCE_EXTENDED', 734 '_XOPEN_SOURCE=600', 735 '_UNIX03_THREADS', 736 '_UNIX03_WITHDRAWN', 737 '_UNIX03_SOURCE', 738 '_OPEN_SYS_SOCK_IPV6', 739 '_OPEN_SYS_FILE_EXT=1', 740 '_POSIX_SOURCE', 741 '_OPEN_SYS', 742 '_OPEN_SYS_IF_EXT', 743 '_OPEN_SYS_SOCK_IPV6', 744 '_OPEN_MSGQ_EXT', 745 '_LARGE_TIME_API', 746 '_ALL_SOURCE', 747 '_AE_BIMODAL=1', 748 '__IBMCPP_TR1__', 749 'NODE_PLATFORM="os390"', 750 'PATH_MAX=1024', 751 '_ENHANCED_ASCII_EXT=0xFFFFFFFF', 752 '_Export=extern', 753 '__static_assert=static_assert', 754 ], 755 'cflags': [ 756 '-q64', 757 '-Wc,DLL', 758 '-Wa,GOFF', 759 '-qARCH=10', 760 '-qASCII', 761 '-qTUNE=12', 762 '-qENUM=INT', 763 '-qEXPORTALL', 764 '-qASM', 765 ], 766 'cflags_cc': [ 767 '-qxclang=-std=c++14', 768 ], 769 'ldflags': [ 770 '-q64', 771 ], 772 # for addons due to v8config.h include of "zos-base.h": 773 'include_dirs': ['<(zoslib_include_dir)'], 774 }], 775 ], 776 } 777 }
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2026 MyWebUniversity.com ™