|
21 | 21 | 'node_v8_options%': '',
|
22 | 22 | 'node_enable_v8_vtunejit%': 'false',
|
23 | 23 | 'node_core_target_name%': 'node',
|
| 24 | + 'node_lib_target_name%': 'node_lib', |
| 25 | + 'node_intermediate_lib_type%': 'static_library', |
24 | 26 | 'library_files': [
|
25 | 27 | 'lib/internal/bootstrap_node.js',
|
26 | 28 | 'lib/_debug_agent.js',
|
|
111 | 113 | 'conditions': [
|
112 | 114 | [ 'node_shared=="true"', {
|
113 | 115 | 'node_target_type%': 'shared_library',
|
| 116 | + 'conditions': [ |
| 117 | + ['OS=="aix"', { |
| 118 | + # For AIX, always generate static library first, |
| 119 | + # It needs an extra step to generate exp and |
| 120 | + # then use both static lib and exp to create |
| 121 | + # shared lib. |
| 122 | + 'node_intermediate_lib_type': 'static_library', |
| 123 | + }, { |
| 124 | + 'node_intermediate_lib_type': 'shared_library', |
| 125 | + }], |
| 126 | + ], |
114 | 127 | }, {
|
115 | 128 | 'node_target_type%': 'executable',
|
116 | 129 | }],
|
|
127 | 140 | 'targets': [
|
128 | 141 | {
|
129 | 142 | 'target_name': '<(node_core_target_name)',
|
130 |
| - 'type': '<(node_target_type)', |
| 143 | + 'type': 'executable', |
| 144 | + 'sources': [ |
| 145 | + 'src/node_main.cc' |
| 146 | + ], |
| 147 | + 'include_dirs': [ |
| 148 | + 'src', |
| 149 | + 'deps/v8/include', |
| 150 | + ], |
| 151 | + 'conditions': [ |
| 152 | + [ 'node_intermediate_lib_type=="static_library" and ' |
| 153 | + 'node_shared=="true" and OS=="aix"', { |
| 154 | + # For AIX, shared lib is linked by static lib and .exp. In the |
| 155 | + # case here, the executable needs to link to shared lib. |
| 156 | + # Therefore, use 'node_aix_shared' target to generate the |
| 157 | + # shared lib and then executable. |
| 158 | + 'dependencies': [ 'node_aix_shared' ], |
| 159 | + }, { |
| 160 | + 'dependencies': [ '<(node_lib_target_name)' ], |
| 161 | + }], |
| 162 | + [ 'node_intermediate_lib_type=="static_library" and ' |
| 163 | + 'node_shared=="false"', { |
| 164 | + 'includes': [ |
| 165 | + 'node.gypi' |
| 166 | + ], |
| 167 | + 'xcode_settings': { |
| 168 | + 'OTHER_LDFLAGS': [ |
| 169 | + '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)' |
| 170 | + '<(node_core_target_name)<(STATIC_LIB_SUFFIX)', |
| 171 | + ], |
| 172 | + }, |
| 173 | + 'msvs_settings': { |
| 174 | + 'VCLinkerTool': { |
| 175 | + 'AdditionalOptions': [ |
| 176 | + '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\' |
| 177 | + '<(node_core_target_name)<(STATIC_LIB_SUFFIX)', |
| 178 | + ], |
| 179 | + }, |
| 180 | + }, |
| 181 | + 'conditions': [ |
| 182 | + ['OS in "linux freebsd openbsd solaris android"', { |
| 183 | + 'ldflags': [ |
| 184 | + '-Wl,--whole-archive,<(OBJ_DIR)/<(STATIC_LIB_PREFIX)' |
| 185 | + '<(node_core_target_name)<(STATIC_LIB_SUFFIX)', |
| 186 | + '-Wl,--no-whole-archive', |
| 187 | + ], |
| 188 | + }], |
| 189 | + [ 'OS=="win"', { |
| 190 | + 'sources': [ 'src/res/node.rc' ], |
| 191 | + 'conditions': [ |
| 192 | + [ 'node_use_etw=="true"', { |
| 193 | + 'sources': [ |
| 194 | + 'tools/msvs/genfiles/node_etw_provider.rc' |
| 195 | + ], |
| 196 | + }], |
| 197 | + [ 'node_use_perfctr=="true"', { |
| 198 | + 'sources': [ |
| 199 | + 'tools/msvs/genfiles/node_perfctr_provider.rc', |
| 200 | + ], |
| 201 | + }] |
| 202 | + ], |
| 203 | + }], |
| 204 | + ], |
| 205 | + }], |
| 206 | + [ 'node_intermediate_lib_type=="shared_library" and OS=="win"', { |
| 207 | + # On Windows, having the same name for both executable and shared |
| 208 | + # lib causes filename collision. Need a different PRODUCT_NAME for |
| 209 | + # the executable and rename it back to node.exe later |
| 210 | + 'product_name': '<(node_core_target_name)-win', |
| 211 | + }], |
| 212 | + ], |
| 213 | + }, |
| 214 | + { |
| 215 | + 'target_name': '<(node_lib_target_name)', |
| 216 | + 'type': '<(node_intermediate_lib_type)', |
| 217 | + 'product_name': '<(node_core_target_name)', |
131 | 218 |
|
132 | 219 | 'dependencies': [
|
133 | 220 | 'node_js2c#host',
|
|
139 | 226 |
|
140 | 227 | 'include_dirs': [
|
141 | 228 | 'src',
|
142 |
| - 'tools/msvs/genfiles', |
143 | 229 | 'deps/uv/src/ares',
|
144 | 230 | '<(SHARED_INTERMEDIATE_DIR)',
|
145 | 231 | ],
|
|
161 | 247 | 'src/node_contextify.cc',
|
162 | 248 | 'src/node_file.cc',
|
163 | 249 | 'src/node_http_parser.cc',
|
164 |
| - 'src/node_main.cc', |
165 | 250 | 'src/node_os.cc',
|
166 | 251 | 'src/node_revert.cc',
|
167 | 252 | 'src/node_url.cc',
|
|
249 | 334 | 'conditions': [
|
250 | 335 | [ 'node_shared=="true" and node_module_version!="" and OS!="win"', {
|
251 | 336 | 'product_extension': '<(shlib_suffix)',
|
252 |
| - }] |
| 337 | + }], |
| 338 | + ['node_shared=="true" and OS=="aix"', { |
| 339 | + 'product_name': 'node_base', |
| 340 | + }], |
| 341 | + [ 'v8_inspector=="true"', { |
| 342 | + 'defines': [ |
| 343 | + 'HAVE_INSPECTOR=1', |
| 344 | + ], |
| 345 | + 'sources': [ |
| 346 | + 'src/inspector_agent.cc', |
| 347 | + 'src/inspector_socket.cc', |
| 348 | + 'src/inspector_agent.h', |
| 349 | + 'src/inspector_socket.h', |
| 350 | + ], |
| 351 | + 'dependencies': [ |
| 352 | + 'deps/v8_inspector/third_party/v8_inspector/platform/' |
| 353 | + 'v8_inspector/v8_inspector.gyp:v8_inspector_stl', |
| 354 | + 'deps/v8_inspector/third_party/v8_inspector/platform/' |
| 355 | + 'v8_inspector/v8_inspector.gyp:protocol_sources_stl', |
| 356 | + 'v8_inspector_compress_protocol_json#host', |
| 357 | + ], |
| 358 | + 'include_dirs': [ |
| 359 | + 'deps/v8_inspector/third_party/v8_inspector', |
| 360 | + '<(SHARED_INTERMEDIATE_DIR)/blink', # for inspector |
| 361 | + ], |
| 362 | + }, { |
| 363 | + 'defines': [ 'HAVE_INSPECTOR=0' ] |
| 364 | + }], |
| 365 | + [ 'OS=="win"', { |
| 366 | + 'sources': [ |
| 367 | + 'src/backtrace_win32.cc', |
| 368 | + ], |
| 369 | + 'conditions': [ |
| 370 | + [ 'node_intermediate_lib_type!="static_library"', { |
| 371 | + 'sources': [ |
| 372 | + 'src/res/node.rc', |
| 373 | + ], |
| 374 | + }], |
| 375 | + ], |
| 376 | + 'defines!': [ |
| 377 | + 'NODE_PLATFORM="win"', |
| 378 | + ], |
| 379 | + 'defines': [ |
| 380 | + 'FD_SETSIZE=1024', |
| 381 | + # we need to use node's preferred "win32" rather than gyp's preferred "win" |
| 382 | + 'NODE_PLATFORM="win32"', |
| 383 | + '_UNICODE=1', |
| 384 | + ], |
| 385 | + 'libraries': [ '-lpsapi.lib' ] |
| 386 | + }, { # POSIX |
| 387 | + 'defines': [ '__POSIX__' ], |
| 388 | + 'sources': [ 'src/backtrace_posix.cc' ], |
| 389 | + }], |
| 390 | + [ 'node_use_etw=="true"', { |
| 391 | + 'defines': [ 'HAVE_ETW=1' ], |
| 392 | + 'dependencies': [ 'node_etw' ], |
| 393 | + 'include_dirs': [ |
| 394 | + 'src', |
| 395 | + 'tools/msvs/genfiles', |
| 396 | + '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h |
| 397 | + ], |
| 398 | + 'sources': [ |
| 399 | + 'src/node_win32_etw_provider.h', |
| 400 | + 'src/node_win32_etw_provider-inl.h', |
| 401 | + 'src/node_win32_etw_provider.cc', |
| 402 | + 'src/node_dtrace.cc', |
| 403 | + 'tools/msvs/genfiles/node_etw_provider.h', |
| 404 | + ], |
| 405 | + 'conditions': [ |
| 406 | + ['node_intermediate_lib_type != "static_library"', { |
| 407 | + 'sources': [ |
| 408 | + 'tools/msvs/genfiles/node_etw_provider.rc', |
| 409 | + ], |
| 410 | + }], |
| 411 | + ], |
| 412 | + }], |
| 413 | + [ 'node_use_perfctr=="true"', { |
| 414 | + 'defines': [ 'HAVE_PERFCTR=1' ], |
| 415 | + 'dependencies': [ 'node_perfctr' ], |
| 416 | + 'include_dirs': [ |
| 417 | + 'src', |
| 418 | + 'tools/msvs/genfiles', |
| 419 | + '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h |
| 420 | + ], |
| 421 | + 'sources': [ |
| 422 | + 'src/node_win32_perfctr_provider.h', |
| 423 | + 'src/node_win32_perfctr_provider.cc', |
| 424 | + 'src/node_counters.cc', |
| 425 | + 'src/node_counters.h', |
| 426 | + ], |
| 427 | + 'conditions': [ |
| 428 | + ['node_intermediate_lib_type != "static_library"', { |
| 429 | + 'sources': [ |
| 430 | + 'tools/msvs/genfiles/node_perfctr_provider.rc', |
| 431 | + ], |
| 432 | + }], |
| 433 | + ], |
| 434 | + }], |
| 435 | + [ 'node_use_lttng=="true"', { |
| 436 | + 'defines': [ 'HAVE_LTTNG=1' ], |
| 437 | + 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], |
| 438 | + 'libraries': [ '-llttng-ust' ], |
| 439 | + 'include_dirs': [ |
| 440 | + 'src', |
| 441 | + 'tools/msvs/genfiles', |
| 442 | + '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h |
| 443 | + ], |
| 444 | + 'sources': [ |
| 445 | + 'src/node_lttng.cc' |
| 446 | + ], |
| 447 | + }], |
| 448 | + [ 'node_use_dtrace=="true"', { |
| 449 | + 'defines': [ 'HAVE_DTRACE=1' ], |
| 450 | + 'dependencies': [ |
| 451 | + 'node_dtrace_header', |
| 452 | + 'specialize_node_d', |
| 453 | + ], |
| 454 | + 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], |
| 455 | + # |
| 456 | + # DTrace is supported on linux, solaris, mac, and bsd. There are |
| 457 | + # three object files associated with DTrace support, but they're |
| 458 | + # not all used all the time: |
| 459 | + # |
| 460 | + # node_dtrace.o all configurations |
| 461 | + # node_dtrace_ustack.o not supported on mac and linux |
| 462 | + # node_dtrace_provider.o All except OS X. "dtrace -G" is not |
| 463 | + # used on OS X. |
| 464 | + # |
| 465 | + # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not |
| 466 | + # actually exist. They're listed here to trick GYP into linking the |
| 467 | + # corresponding object files into the final "node" executable. These |
| 468 | + # object files are generated by "dtrace -G" using custom actions |
| 469 | + # below, and the GYP-generated Makefiles will properly build them when |
| 470 | + # needed. |
| 471 | + # |
| 472 | + 'sources': [ 'src/node_dtrace.cc' ], |
| 473 | + 'conditions': [ |
| 474 | + [ 'OS=="linux"', { |
| 475 | + 'sources': [ |
| 476 | + '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o' |
| 477 | + ], |
| 478 | + }], |
| 479 | + [ 'OS!="mac" and OS!="linux"', { |
| 480 | + 'sources': [ |
| 481 | + 'src/node_dtrace_ustack.cc', |
| 482 | + 'src/node_dtrace_provider.cc', |
| 483 | + ] |
| 484 | + } |
| 485 | + ] ] |
| 486 | + } ], |
| 487 | + [ 'node_use_openssl=="true"', { |
| 488 | + 'sources': [ |
| 489 | + 'src/node_crypto.cc', |
| 490 | + 'src/node_crypto_bio.cc', |
| 491 | + 'src/node_crypto_clienthello.cc', |
| 492 | + 'src/node_crypto.h', |
| 493 | + 'src/node_crypto_bio.h', |
| 494 | + 'src/node_crypto_clienthello.h', |
| 495 | + 'src/tls_wrap.cc', |
| 496 | + 'src/tls_wrap.h' |
| 497 | + ], |
| 498 | + }], |
253 | 499 | ],
|
254 | 500 | 'direct_dependent_settings': {
|
255 | 501 | 'defines': [
|
|
398 | 644 | [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
|
399 | 645 | 'inputs': [ 'src/notrace_macros.py' ]
|
400 | 646 | }],
|
401 |
| - ['node_use_lttng=="false"', { |
| 647 | + [ 'node_use_lttng=="false"', { |
402 | 648 | 'inputs': [ 'src/nolttng_macros.py' ]
|
403 | 649 | }],
|
404 | 650 | [ 'node_use_perfctr=="false"', {
|
|
451 | 697 | {
|
452 | 698 | 'action_name': 'node_dtrace_provider_o',
|
453 | 699 | 'inputs': [
|
454 |
| - '<(OBJ_DIR)/node/src/node_dtrace.o', |
| 700 | + '<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace.o', |
455 | 701 | ],
|
456 | 702 | 'outputs': [
|
457 |
| - '<(OBJ_DIR)/node/src/node_dtrace_provider.o' |
| 703 | + '<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace_provider.o' |
458 | 704 | ],
|
459 | 705 | 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
|
460 | 706 | '<@(_inputs)', '-o', '<@(_outputs)' ]
|
|
504 | 750 | '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
|
505 | 751 | ],
|
506 | 752 | 'outputs': [
|
507 |
| - '<(OBJ_DIR)/node/src/node_dtrace_ustack.o' |
| 753 | + '<(OBJ_DIR)/<(node_lib_target_name)/src/node_dtrace_ustack.o' |
508 | 754 | ],
|
509 | 755 | 'conditions': [
|
510 | 756 | [ 'target_arch=="ia32" or target_arch=="arm"', {
|
|
551 | 797 | } ],
|
552 | 798 | ]
|
553 | 799 | },
|
| 800 | + { |
| 801 | + # When using shared lib to build executable in Windows, in order to avoid |
| 802 | + # filename collision, the executable name is node-win.exe. Need to rename |
| 803 | + # it back to node.exe |
| 804 | + 'target_name': 'rename_node_bin_win', |
| 805 | + 'type': 'none', |
| 806 | + 'dependencies': [ |
| 807 | + '<(node_core_target_name)', |
| 808 | + ], |
| 809 | + 'conditions': [ |
| 810 | + [ 'OS=="win" and node_intermediate_lib_type=="shared_library"', { |
| 811 | + 'actions': [ |
| 812 | + { |
| 813 | + 'action_name': 'rename_node_bin_win', |
| 814 | + 'inputs': [ |
| 815 | + '<(PRODUCT_DIR)/<(node_core_target_name)-win.exe' |
| 816 | + ], |
| 817 | + 'outputs': [ |
| 818 | + '<(PRODUCT_DIR)/<(node_core_target_name).exe', |
| 819 | + ], |
| 820 | + 'action': [ |
| 821 | + 'mv', '<@(_inputs)', '<@(_outputs)', |
| 822 | + ], |
| 823 | + }, |
| 824 | + ], |
| 825 | + } ], |
| 826 | + ] |
| 827 | + }, |
554 | 828 | {
|
555 | 829 | 'target_name': 'cctest',
|
556 | 830 | 'type': 'executable',
|
557 | 831 |
|
558 | 832 | 'dependencies': [
|
559 | 833 | '<(node_core_target_name)',
|
| 834 | + 'rename_node_bin_win', |
560 | 835 | 'deps/gtest/gtest.gyp:gtest',
|
561 | 836 | 'node_js2c#host',
|
562 | 837 | 'node_dtrace_header',
|
|
565 | 840 | ],
|
566 | 841 |
|
567 | 842 | 'variables': {
|
568 |
| - 'OBJ_PATH': '<(OBJ_DIR)/node/src', |
569 |
| - 'OBJ_GEN_PATH': '<(OBJ_DIR)/node/gen', |
| 843 | + 'OBJ_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/src', |
| 844 | + 'OBJ_GEN_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/gen', |
570 | 845 | 'OBJ_SUFFIX': 'o',
|
571 | 846 | 'conditions': [
|
572 | 847 | ['OS=="win"', {
|
573 |
| - 'OBJ_PATH': '<(OBJ_DIR)/node', |
574 |
| - 'OBJ_GEN_PATH': '<(OBJ_DIR)/node', |
| 848 | + 'OBJ_PATH': '<(OBJ_DIR)/<(node_lib_target_name)', |
| 849 | + 'OBJ_GEN_PATH': '<(OBJ_DIR)/<(node_lib_target_name)', |
575 | 850 | 'OBJ_SUFFIX': 'obj',
|
576 | 851 | }],
|
577 | 852 | ['OS=="aix"', {
|
578 |
| - 'OBJ_PATH': '<(OBJ_DIR)/node_base/src', |
579 |
| - 'OBJ_GEN_PATH': '<(OBJ_DIR)/node_base/gen', |
| 853 | + 'OBJ_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/src', |
| 854 | + 'OBJ_GEN_PATH': '<(OBJ_DIR)/<(node_lib_target_name)/gen', |
580 | 855 | }],
|
581 | 856 | ],
|
582 | 857 | },
|
|
628 | 903 | 'test/cctest/test_url.cc'
|
629 | 904 | ],
|
630 | 905 |
|
631 |
| - 'sources!': [ |
632 |
| - 'src/node_main.cc' |
633 |
| - ], |
634 |
| - |
635 | 906 | 'conditions': [
|
| 907 | + [ 'node_use_openssl=="true"', { |
| 908 | + 'conditions': [ |
| 909 | + ['node_target_type!="static_library"', { |
| 910 | + 'libraries': [ |
| 911 | + '<(OBJ_PATH)/node_crypto.<(OBJ_SUFFIX)', |
| 912 | + '<(OBJ_PATH)/node_crypto_bio.<(OBJ_SUFFIX)', |
| 913 | + '<(OBJ_PATH)/node_crypto_clienthello.<(OBJ_SUFFIX)', |
| 914 | + '<(OBJ_PATH)/tls_wrap.<(OBJ_SUFFIX)', |
| 915 | + ], |
| 916 | + }], |
| 917 | + ], |
| 918 | + 'defines': [ |
| 919 | + 'HAVE_OPENSSL=1', |
| 920 | + ], |
| 921 | + }], |
| 922 | + [ 'node_use_perfctr=="true"', { |
| 923 | + 'defines': [ 'HAVE_PERFCTR=1' ], |
| 924 | + 'libraries': [ |
| 925 | + '<(OBJ_PATH)/node_counters.<(OBJ_SUFFIX)', |
| 926 | + '<(OBJ_PATH)/node_win32_perfctr_provider.<(OBJ_SUFFIX)', |
| 927 | + ], |
| 928 | + }], |
636 | 929 | ['v8_inspector=="true"', {
|
637 | 930 | 'sources': [
|
638 | 931 | 'test/cctest/test_inspector_socket.cc',
|
639 | 932 | ],
|
| 933 | + 'dependencies': [ |
| 934 | + 'deps/v8_inspector/third_party/v8_inspector/platform/' |
| 935 | + 'v8_inspector/v8_inspector.gyp:v8_inspector_stl', |
| 936 | + 'deps/v8_inspector/third_party/v8_inspector/platform/' |
| 937 | + 'v8_inspector/v8_inspector.gyp:protocol_sources_stl', |
| 938 | + 'v8_inspector_compress_protocol_json#host', |
| 939 | + ], |
| 940 | + 'include_dirs': [ |
| 941 | + 'deps/v8_inspector/third_party/v8_inspector', |
| 942 | + '<(SHARED_INTERMEDIATE_DIR)/blink', # for inspector |
| 943 | + ], |
| 944 | + 'libraries': [ |
| 945 | + '<(OBJ_PATH)/inspector_agent.<(OBJ_SUFFIX)', |
| 946 | + '<(OBJ_PATH)/inspector_socket.<(OBJ_SUFFIX)', |
| 947 | + ], |
640 | 948 | 'conditions': [
|
641 | 949 | [ 'node_shared_openssl=="false" and node_shared=="false"', {
|
642 | 950 | 'dependencies': [
|
643 | 951 | 'deps/openssl/openssl.gyp:openssl'
|
644 | 952 | ]
|
645 | 953 | }],
|
646 |
| - [ 'node_shared_http_parser=="false"', { |
647 |
| - 'dependencies': [ |
648 |
| - 'deps/http_parser/http_parser.gyp:http_parser' |
| 954 | + ] |
| 955 | + }], |
| 956 | + [ 'node_use_dtrace=="true"', { |
| 957 | + 'libraries': [ |
| 958 | + '<(OBJ_PATH)/node_dtrace.<(OBJ_SUFFIX)', |
| 959 | + ], |
| 960 | + 'conditions': [ |
| 961 | + ['OS!="mac" and OS!="linux"', { |
| 962 | + 'libraries': [ |
| 963 | + '<(OBJ_PATH)/node_dtrace_provider.<(OBJ_SUFFIX)', |
| 964 | + '<(OBJ_PATH)/node_dtrace_ustack.<(OBJ_SUFFIX)', |
649 | 965 | ]
|
650 | 966 | }],
|
651 |
| - [ 'node_shared_libuv=="false"', { |
652 |
| - 'dependencies': [ |
653 |
| - 'deps/uv/uv.gyp:libuv' |
| 967 | + ['OS=="linux"', { |
| 968 | + 'libraries': [ |
| 969 | + '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.<(OBJ_SUFFIX)', |
654 | 970 | ]
|
| 971 | + }], |
| 972 | + ], |
| 973 | + }, { |
| 974 | + 'conditions': [ |
| 975 | + [ 'node_use_etw=="true" and OS=="win"', { |
| 976 | + 'libraries': [ |
| 977 | + '<(OBJ_PATH)/node_dtrace.<(OBJ_SUFFIX)', |
| 978 | + '<(OBJ_PATH)/node_win32_etw_provider.<(OBJ_SUFFIX)', |
| 979 | + ], |
655 | 980 | }]
|
656 | 981 | ]
|
657 | 982 | }],
|
658 |
| - [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', { |
659 |
| - 'copies': [{ |
660 |
| - 'destination': '<(OBJ_DIR)/cctest/src', |
661 |
| - 'files': [ |
662 |
| - '<(OBJ_PATH)/node_dtrace_ustack.<(OBJ_SUFFIX)', |
663 |
| - '<(OBJ_PATH)/node_dtrace_provider.<(OBJ_SUFFIX)', |
664 |
| - '<(OBJ_PATH)/node_dtrace.<(OBJ_SUFFIX)', |
665 |
| - ]}, |
| 983 | + [ 'OS=="win"', { |
| 984 | + 'libraries': [ |
| 985 | + '<(OBJ_PATH)/backtrace_win32.<(OBJ_SUFFIX)', |
| 986 | + ], |
| 987 | + }, { # POSIX |
| 988 | + 'defines': [ '__POSIX__' ], |
| 989 | + 'libraries': [ |
| 990 | + '<(OBJ_PATH)/backtrace_posix.<(OBJ_SUFFIX)', |
666 | 991 | ],
|
667 | 992 | }],
|
668 | 993 | ['OS=="solaris"', {
|
|
673 | 998 | ], # end targets
|
674 | 999 |
|
675 | 1000 | 'conditions': [
|
676 |
| - ['OS=="aix"', { |
| 1001 | + [ 'OS=="aix" and node_shared=="true"', { |
677 | 1002 | 'targets': [
|
678 | 1003 | {
|
679 |
| - 'target_name': 'node', |
| 1004 | + 'target_name': 'node_aix_shared', |
| 1005 | + 'type': 'shared_library', |
| 1006 | + 'product_name': '<(node_core_target_name)', |
| 1007 | + 'ldflags': [ '--shared' ], |
| 1008 | + 'product_extension': '<(shlib_suffix)', |
680 | 1009 | 'conditions': [
|
681 |
| - ['node_shared=="true"', { |
682 |
| - 'type': 'shared_library', |
683 |
| - 'ldflags': ['--shared'], |
684 |
| - 'product_extension': '<(shlib_suffix)', |
685 |
| - }, { |
686 |
| - 'type': 'executable', |
687 |
| - }], |
688 | 1010 | ['target_arch=="ppc64"', {
|
689 | 1011 | 'ldflags': [
|
690 |
| - '-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread/ppc64' |
| 1012 | + '-Wl,-blibpath:/usr/lib:/lib:' |
| 1013 | + '/opt/freeware/lib/pthread/ppc64' |
691 | 1014 | ],
|
692 | 1015 | }],
|
693 | 1016 | ['target_arch=="ppc"', {
|
|
696 | 1019 | ],
|
697 | 1020 | }]
|
698 | 1021 | ],
|
699 |
| - 'dependencies': ['<(node_core_target_name)', 'node_exp'], |
700 |
| - |
| 1022 | + 'includes': [ |
| 1023 | + 'node.gypi' |
| 1024 | + ], |
| 1025 | + 'dependencies': [ '<(node_lib_target_name)' ], |
701 | 1026 | 'include_dirs': [
|
702 | 1027 | 'src',
|
703 | 1028 | 'deps/v8/include',
|
704 | 1029 | ],
|
705 |
| - |
706 | 1030 | 'sources': [
|
707 |
| - 'src/node_main.cc', |
708 | 1031 | '<@(library_files)',
|
709 |
| - # node.gyp is added to the project by default. |
710 | 1032 | 'common.gypi',
|
711 | 1033 | ],
|
712 |
| - |
713 |
| - 'ldflags': ['-Wl,-bE:<(PRODUCT_DIR)/node.exp'], |
714 | 1034 | },
|
715 |
| - { |
716 |
| - 'target_name': 'node_exp', |
717 |
| - 'type': 'none', |
718 |
| - 'dependencies': [ |
719 |
| - '<(node_core_target_name)', |
720 |
| - ], |
721 |
| - 'actions': [ |
722 |
| - { |
723 |
| - 'action_name': 'expfile', |
724 |
| - 'inputs': [ |
725 |
| - '<(OBJ_DIR)' |
726 |
| - ], |
727 |
| - 'outputs': [ |
728 |
| - '<(PRODUCT_DIR)/node.exp' |
729 |
| - ], |
730 |
| - 'action': [ |
731 |
| - 'sh', 'tools/create_expfile.sh', |
732 |
| - '<@(_inputs)', '<@(_outputs)' |
733 |
| - ], |
734 |
| - } |
735 |
| - ] |
736 |
| - } |
737 |
| - ], # end targets |
| 1035 | + ] |
738 | 1036 | }], # end aix section
|
739 | 1037 | ], # end conditions block
|
740 | 1038 | }
|
0 commit comments