|
292 | 292 | # Warn when using deprecated V8 APIs.
|
293 | 293 | 'V8_DEPRECATION_WARNINGS=1',
|
294 | 294 | ],
|
| 295 | + 'conditions': [ |
| 296 | + [ 'node_shared=="true" and node_module_version!="" and OS!="win"', { |
| 297 | + 'product_extension': '<(shlib_suffix)', |
| 298 | + }], |
| 299 | + [ 'v8_enable_inspector==1', { |
| 300 | + 'defines': [ |
| 301 | + 'HAVE_INSPECTOR=1', |
| 302 | + ], |
| 303 | + 'sources': [ |
| 304 | + 'src/inspector_agent.cc', |
| 305 | + 'src/inspector_io.cc', |
| 306 | + 'src/inspector_js_api.cc', |
| 307 | + 'src/inspector_socket.cc', |
| 308 | + 'src/inspector_socket_server.cc', |
| 309 | + 'src/inspector_agent.h', |
| 310 | + 'src/inspector_io.h', |
| 311 | + 'src/inspector_socket.h', |
| 312 | + 'src/inspector_socket_server.h', |
| 313 | + ], |
| 314 | + 'dependencies': [ |
| 315 | + 'v8_inspector_compress_protocol_json#host', |
| 316 | + ], |
| 317 | + 'include_dirs': [ |
| 318 | + '<(SHARED_INTERMEDIATE_DIR)/include', # for inspector |
| 319 | + '<(SHARED_INTERMEDIATE_DIR)', |
| 320 | + ], |
| 321 | + }, { |
| 322 | + 'defines': [ 'HAVE_INSPECTOR=0' ] |
| 323 | + }], |
| 324 | + [ 'OS=="win"', { |
| 325 | + 'sources': [ |
| 326 | + 'src/backtrace_win32.cc', |
| 327 | + 'src/res/node.rc', |
| 328 | + ], |
| 329 | + 'defines!': [ |
| 330 | + 'NODE_PLATFORM="win"', |
| 331 | + ], |
| 332 | + 'defines': [ |
| 333 | + 'FD_SETSIZE=1024', |
| 334 | + # we need to use node's preferred "win32" rather than gyp's preferred "win" |
| 335 | + 'NODE_PLATFORM="win32"', |
| 336 | + '_UNICODE=1', |
| 337 | + ], |
| 338 | + 'libraries': [ '-lpsapi.lib' ] |
| 339 | + }, { # POSIX |
| 340 | + 'defines': [ '__POSIX__' ], |
| 341 | + 'sources': [ 'src/backtrace_posix.cc' ], |
| 342 | + }], |
| 343 | + [ 'node_use_dtrace=="true"', { |
| 344 | + 'defines': [ 'HAVE_DTRACE=1' ], |
| 345 | + 'dependencies': [ |
| 346 | + 'node_dtrace_header', |
| 347 | + 'specialize_node_d', |
| 348 | + ], |
| 349 | + 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], |
| 350 | + # |
| 351 | + # DTrace is supported on linux, solaris, mac, and bsd. There are |
| 352 | + # three object files associated with DTrace support, but they're |
| 353 | + # not all used all the time: |
| 354 | + # |
| 355 | + # node_dtrace.o all configurations |
| 356 | + # node_dtrace_ustack.o not supported on mac and linux |
| 357 | + # node_dtrace_provider.o All except OS X. "dtrace -G" is not |
| 358 | + # used on OS X. |
| 359 | + # |
| 360 | + # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not |
| 361 | + # actually exist. They're listed here to trick GYP into linking the |
| 362 | + # corresponding object files into the final "node" executable. These |
| 363 | + # object files are generated by "dtrace -G" using custom actions |
| 364 | + # below, and the GYP-generated Makefiles will properly build them when |
| 365 | + # needed. |
| 366 | + # |
| 367 | + 'sources': [ 'src/node_dtrace.cc' ], |
| 368 | + 'conditions': [ |
| 369 | + [ 'OS=="linux"', { |
| 370 | + 'sources': [ |
| 371 | + '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o' |
| 372 | + ], |
| 373 | + }], |
| 374 | + [ 'OS!="mac" and OS!="linux"', { |
| 375 | + 'sources': [ |
| 376 | + 'src/node_dtrace_ustack.cc', |
| 377 | + 'src/node_dtrace_provider.cc', |
| 378 | + ] |
| 379 | + } |
| 380 | + ] ] |
| 381 | + } ], |
| 382 | + [ 'node_use_openssl=="true"', { |
| 383 | + 'defines': [ 'HAVE_OPENSSL=1' ], |
| 384 | + 'sources': [ |
| 385 | + 'src/node_crypto.cc', |
| 386 | + 'src/node_crypto_bio.cc', |
| 387 | + 'src/node_crypto_clienthello.cc', |
| 388 | + 'src/node_crypto.h', |
| 389 | + 'src/node_crypto_bio.h', |
| 390 | + 'src/node_crypto_clienthello.h', |
| 391 | + 'src/tls_wrap.cc', |
| 392 | + 'src/tls_wrap.h' |
| 393 | + ], |
| 394 | + 'conditions': [ |
| 395 | + ['openssl_fips != ""', { |
| 396 | + 'defines': [ 'NODE_FIPS_MODE' ], |
| 397 | + }], |
| 398 | + [ 'node_shared_openssl=="false"', { |
| 399 | + 'dependencies': [ |
| 400 | + './deps/openssl/openssl.gyp:openssl', |
| 401 | + |
| 402 | + # For tests |
| 403 | + './deps/openssl/openssl.gyp:openssl-cli', |
| 404 | + ], |
| 405 | + 'conditions': [ |
| 406 | + # -force_load or --whole-archive are not applicable for |
| 407 | + # the static library |
| 408 | + [ 'node_target_type!="static_library"', { |
| 409 | + 'xcode_settings': { |
| 410 | + 'OTHER_LDFLAGS': [ |
| 411 | + '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)', |
| 412 | + ], |
| 413 | + }, |
| 414 | + 'conditions': [ |
| 415 | + ['OS in "linux freebsd" and node_shared=="false"', { |
| 416 | + 'ldflags': [ |
| 417 | + '-Wl,--whole-archive,' |
| 418 | + '<(OBJ_DIR)/deps/openssl/' |
| 419 | + '<(OPENSSL_PRODUCT)', |
| 420 | + '-Wl,--no-whole-archive', |
| 421 | + ], |
| 422 | + }], |
| 423 | + # openssl.def is based on zlib.def, zlib symbols |
| 424 | + # are always exported. |
| 425 | + ['use_openssl_def==1', { |
| 426 | + 'sources': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'], |
| 427 | + }], |
| 428 | + ['OS=="win" and use_openssl_def==0', { |
| 429 | + 'sources': ['deps/zlib/win32/zlib.def'], |
| 430 | + }], |
| 431 | + ], |
| 432 | + }], |
| 433 | + ], |
| 434 | + }]] |
| 435 | + }, { |
| 436 | + 'defines': [ 'HAVE_OPENSSL=0' ] |
| 437 | + }], |
| 438 | + ], |
295 | 439 | },
|
296 | 440 | {
|
297 | 441 | 'target_name': 'mkssldef',
|
|
647 | 791 | 'defines': [ 'NODE_WANT_INTERNALS=1' ],
|
648 | 792 |
|
649 | 793 | 'sources': [
|
650 |
| - 'src/node_platform.cc', |
651 |
| - 'src/node_platform.h', |
652 | 794 | 'test/cctest/node_test_fixture.cc',
|
653 | 795 | 'test/cctest/test_aliased_buffer.cc',
|
654 | 796 | 'test/cctest/test_base64.cc',
|
|
664 | 806 | 'conditions': [
|
665 | 807 | ['node_target_type!="static_library"', {
|
666 | 808 | 'libraries': [
|
667 |
| - '<(OBJ_GEN_PATH)<(OBJ_SEPARATOR)node_javascript.<(OBJ_SUFFIX)', |
668 |
| - '<(OBJ_PATH)<(OBJ_SEPARATOR)node_debug_options.<(OBJ_SUFFIX)', |
669 | 809 | '<(OBJ_PATH)<(OBJ_SEPARATOR)async-wrap.<(OBJ_SUFFIX)',
|
670 | 810 | '<(OBJ_PATH)<(OBJ_SEPARATOR)env.<(OBJ_SUFFIX)',
|
671 | 811 | '<(OBJ_PATH)<(OBJ_SEPARATOR)node.<(OBJ_SUFFIX)',
|
672 | 812 | '<(OBJ_PATH)<(OBJ_SEPARATOR)node_buffer.<(OBJ_SUFFIX)',
|
| 813 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)node_debug_options.<(OBJ_SUFFIX)', |
673 | 814 | '<(OBJ_PATH)<(OBJ_SEPARATOR)node_i18n.<(OBJ_SUFFIX)',
|
674 | 815 | '<(OBJ_PATH)<(OBJ_SEPARATOR)node_perf.<(OBJ_SUFFIX)',
|
| 816 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)node_platform.<(OBJ_SUFFIX)', |
675 | 817 | '<(OBJ_PATH)<(OBJ_SEPARATOR)node_url.<(OBJ_SUFFIX)',
|
676 | 818 | '<(OBJ_PATH)<(OBJ_SEPARATOR)util.<(OBJ_SUFFIX)',
|
677 | 819 | '<(OBJ_PATH)<(OBJ_SEPARATOR)string_bytes.<(OBJ_SUFFIX)',
|
|
682 | 824 | '<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_buffer.<(OBJ_SUFFIX)',
|
683 | 825 | '<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_writer.<(OBJ_SUFFIX)',
|
684 | 826 | '<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)trace_event.<(OBJ_SUFFIX)',
|
| 827 | + '<(OBJ_GEN_PATH)<(OBJ_SEPARATOR)node_javascript.<(OBJ_SUFFIX)', |
| 828 | + ], |
| 829 | + }], |
| 830 | + [ 'node_use_openssl=="true"', { |
| 831 | + 'libraries': [ |
| 832 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)node_crypto.<(OBJ_SUFFIX)', |
| 833 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)node_crypto_bio.<(OBJ_SUFFIX)', |
| 834 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)node_crypto_clienthello.<(OBJ_SUFFIX)', |
| 835 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)tls_wrap.<(OBJ_SUFFIX)', |
685 | 836 | ],
|
686 | 837 | }],
|
687 | 838 | ['v8_enable_inspector==1', {
|
688 | 839 | 'sources': [
|
689 | 840 | 'test/cctest/test_inspector_socket.cc',
|
690 | 841 | 'test/cctest/test_inspector_socket_server.cc'
|
691 | 842 | ],
|
692 |
| - 'conditions': [ |
693 |
| - [ 'node_shared_zlib=="false"', { |
694 |
| - 'dependencies': [ |
695 |
| - 'deps/zlib/zlib.gyp:zlib', |
696 |
| - ] |
697 |
| - }], |
698 |
| - [ 'node_shared_openssl=="false" and node_shared=="false"', { |
699 |
| - 'dependencies': [ |
700 |
| - 'deps/openssl/openssl.gyp:openssl' |
701 |
| - ] |
702 |
| - }], |
703 |
| - [ 'node_shared_http_parser=="false"', { |
704 |
| - 'dependencies': [ |
705 |
| - 'deps/http_parser/http_parser.gyp:http_parser' |
706 |
| - ] |
707 |
| - }], |
708 |
| - [ 'node_shared_libuv=="false"', { |
709 |
| - 'dependencies': [ |
710 |
| - 'deps/uv/uv.gyp:libuv' |
711 |
| - ] |
712 |
| - }] |
| 843 | + 'libraries': [ |
| 844 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_agent.<(OBJ_SUFFIX)', |
| 845 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_io.<(OBJ_SUFFIX)', |
| 846 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_js_api.<(OBJ_SUFFIX)', |
| 847 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_socket.<(OBJ_SUFFIX)', |
| 848 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)inspector_socket_server.<(OBJ_SUFFIX)', |
| 849 | + ], |
| 850 | + 'defines': [ |
| 851 | + 'HAVE_INSPECTOR=1', |
| 852 | + ], |
| 853 | + }], |
| 854 | + [ 'node_use_dtrace=="true"', { |
| 855 | + 'libraries': [ |
| 856 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace.<(OBJ_SUFFIX)', |
713 | 857 | ]
|
714 | 858 | }],
|
715 |
| - [ 'node_use_v8_platform=="true"', { |
716 |
| - 'dependencies': [ |
717 |
| - 'deps/v8/src/v8.gyp:v8_libplatform', |
718 |
| - ], |
| 859 | + [ 'OS=="win"', { |
| 860 | + 'libraries': [ |
| 861 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)backtrace_win32.<(OBJ_SUFFIX)', |
| 862 | + ], |
| 863 | + }, { |
| 864 | + 'libraries': [ |
| 865 | + '<(OBJ_PATH)<(OBJ_SEPARATOR)backtrace_posix.<(OBJ_SUFFIX)', |
| 866 | + ], |
719 | 867 | }],
|
720 | 868 | [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
|
721 | 869 | 'copies': [{
|
|
727 | 875 | ]},
|
728 | 876 | ],
|
729 | 877 | }],
|
| 878 | + [ 'node_shared_zlib=="false"', { |
| 879 | + 'dependencies': [ |
| 880 | + 'deps/zlib/zlib.gyp:zlib', |
| 881 | + ] |
| 882 | + }], |
| 883 | + [ 'node_shared_openssl=="false" and node_shared=="false"', { |
| 884 | + 'dependencies': [ |
| 885 | + 'deps/openssl/openssl.gyp:openssl' |
| 886 | + ] |
| 887 | + }], |
| 888 | + [ 'node_shared_http_parser=="false"', { |
| 889 | + 'dependencies': [ |
| 890 | + 'deps/http_parser/http_parser.gyp:http_parser' |
| 891 | + ] |
| 892 | + }], |
| 893 | + [ 'node_shared_libuv=="false"', { |
| 894 | + 'dependencies': [ |
| 895 | + 'deps/uv/uv.gyp:libuv' |
| 896 | + ] |
| 897 | + }], |
| 898 | + [ 'node_use_v8_platform=="true"', { |
| 899 | + 'dependencies': [ |
| 900 | + 'deps/v8/src/v8.gyp:v8_libplatform', |
| 901 | + ], |
| 902 | + }], |
730 | 903 | ['OS=="solaris"', {
|
731 | 904 | 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
|
732 | 905 | }],
|
| 906 | + [ 'node_use_openssl=="true"', { |
| 907 | + 'conditions': [ |
| 908 | + [ 'node_shared_openssl=="false"', { |
| 909 | + 'conditions': [ |
| 910 | + # -force_load or --whole-archive are not applicable for |
| 911 | + # the static library |
| 912 | + [ 'node_target_type!="static_library"', { |
| 913 | + 'xcode_settings': { |
| 914 | + 'OTHER_LDFLAGS': [ |
| 915 | + '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)', |
| 916 | + ], |
| 917 | + }, |
| 918 | + 'conditions': [ |
| 919 | + ['OS in "linux freebsd" and node_shared=="false"', { |
| 920 | + 'ldflags': [ |
| 921 | + '-Wl,--whole-archive,' |
| 922 | + '<(OBJ_DIR)/deps/openssl/' |
| 923 | + '<(OPENSSL_PRODUCT)', |
| 924 | + '-Wl,--no-whole-archive', |
| 925 | + ], |
| 926 | + }], |
| 927 | + ], |
| 928 | + }], |
| 929 | + ], |
| 930 | + }]] |
| 931 | + }], |
733 | 932 | ]
|
734 | 933 | }
|
735 | 934 | ], # end targets
|
|
0 commit comments