| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 87e0675 commit 6e2f7e6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,11 +8,8 @@ | |||
| 8 | 8 | 'node_builtin_modules_path%': '', | |
| 9 | 9 | # `node` executable target name. | |
| 10 | 10 | 'node_core_target_name%': 'node', | |
| 11 | - # Derived flag from `node_shared`. | ||
| 12 | - # On most platforms, this is `static_library` if `node_shared` is false and `shared_library` if `node_shared` is true. | ||
| 13 | - # AIX needs to generate static library first and then link to shared library `node_aix_shared`. | ||
| 14 | - # TODO(legendecas): move this to depend on target `node_base` in AIX build . | ||
| 15 | - 'node_intermediate_lib_type%': 'static_library', | ||
| 11 | + # `libnode` target type, `static_library` if `node_shared` is false and `shared_library` if `node_shared` is true. | ||
| 12 | + 'node_lib_type%': 'static_library', | ||
| 16 | 13 | # `libnode` target name, can be a `static_library` or `shared_library` based on `node_shared`. | |
| 17 | 14 | # NOTE: Gyp will prefix this with `lib` if this name does not start with `lib`. | |
| 18 | 15 | 'node_lib_target_name%': 'libnode', | |
@@ -476,17 +473,7 @@ | |||
| 476 | 473 | }], | |
| 477 | 474 | [ 'node_shared=="true"', { | |
| 478 | 475 | 'node_target_type%': 'shared_library', | |
| 479 | - 'conditions': [ | ||
| 480 | - ['OS in "aix os400"', { | ||
| 481 | - # For AIX, always generate static library first, | ||
| 482 | - # It needs an extra step to generate exp and | ||
| 483 | - # then use both static lib and exp to create | ||
| 484 | - # shared lib. | ||
| 485 | - 'node_intermediate_lib_type': 'static_library', | ||
| 486 | - }, { | ||
| 487 | - 'node_intermediate_lib_type': 'shared_library', | ||
| 488 | - }], | ||
| 489 | - ], | ||
| 476 | + 'node_lib_type': 'shared_library', | ||
| 490 | 477 | }, { | |
| 491 | 478 | 'node_target_type%': 'executable', | |
| 492 | 479 | }], | |
@@ -598,6 +585,10 @@ | |||
| 598 | 585 | 'src/node_main.cc' | |
| 599 | 586 | ], | |
| 600 | 587 | ||
| 588 | + 'dependencies': [ | ||
| 589 | + '<(node_lib_target_name)', | ||
| 590 | + ], | ||
| 591 | + | ||
| 601 | 592 | 'msvs_settings': { | |
| 602 | 593 | 'VCLinkerTool': { | |
| 603 | 594 | 'GenerateMapFile': 'true', # /MAP | |
@@ -630,25 +621,13 @@ | |||
| 630 | 621 | 'WARNING_CFLAGS': [ '-Werror' ], | |
| 631 | 622 | }, | |
| 632 | 623 | }], | |
| 633 | - [ 'node_intermediate_lib_type=="static_library" and ' | ||
| 634 | - 'node_shared=="true" and OS in "aix os400"', { | ||
| 635 | - # For AIX, shared lib is linked by static lib and .exp. In the | ||
| 636 | - # case here, the executable needs to link to shared lib. | ||
| 637 | - # Therefore, use 'node_aix_shared' target to generate the | ||
| 638 | - # shared lib and then executable. | ||
| 639 | - 'dependencies': [ 'node_aix_shared' ], | ||
| 640 | - }, { | ||
| 641 | - 'dependencies': [ '<(node_lib_target_name)' ], | ||
| 642 | - 'conditions': [ | ||
| 643 | - ['OS=="win" and node_shared=="true"', { | ||
| 644 | - 'dependencies': ['generate_node_def'], | ||
| 645 | - 'msvs_settings': { | ||
| 646 | - 'VCLinkerTool': { | ||
| 647 | - 'ModuleDefinitionFile': '<(PRODUCT_DIR)/<(node_core_target_name).def', | ||
| 648 | - }, | ||
| 649 | - }, | ||
| 650 | - }], | ||
| 651 | - ], | ||
| 624 | + ['node_shared=="true" and OS=="win"', { | ||
| 625 | + 'dependencies': ['generate_node_def'], | ||
| 626 | + 'msvs_settings': { | ||
| 627 | + 'VCLinkerTool': { | ||
| 628 | + 'ModuleDefinitionFile': '<(PRODUCT_DIR)/<(node_core_target_name).def', | ||
| 629 | + }, | ||
| 630 | + }, | ||
| 652 | 631 | }], | |
| 653 | 632 | [ 'node_shared=="false"', { | |
| 654 | 633 | # Keep this whole-archive section in sync with the `node_lib` target below. | |
@@ -1046,7 +1025,7 @@ | |||
| 1046 | 1025 | }, # node_base | |
| 1047 | 1026 | { | |
| 1048 | 1027 | 'target_name': '<(node_lib_target_name)', | |
| 1049 | - 'type': '<(node_intermediate_lib_type)', | ||
| 1028 | + 'type': '<(node_lib_type)', | ||
| 1050 | 1029 | 'includes': [ | |
| 1051 | 1030 | 'node.gypi', | |
| 1052 | 1031 | ], | |
@@ -1168,7 +1147,10 @@ | |||
| 1168 | 1147 | }, | |
| 1169 | 1148 | }], | |
| 1170 | 1149 | ['node_shared=="true" and OS in "aix os400"', { | |
| 1171 | - 'product_name': 'node_base', | ||
| 1150 | + 'ldflags': ['--shared'], | ||
| 1151 | + 'direct_dependent_settings': { | ||
| 1152 | + 'ldflags': [ '-Wl,-brtl' ], | ||
| 1153 | + }, | ||
| 1172 | 1154 | }], | |
| 1173 | 1155 | [ 'node_shared=="true" and OS=="win"', { | |
| 1174 | 1156 | 'sources': [ | |
@@ -1690,33 +1672,6 @@ | |||
| 1690 | 1672 | ], # end targets | |
| 1691 | 1673 | ||
| 1692 | 1674 | 'conditions': [ | |
| 1693 | - ['OS in "aix os400" and node_shared=="true"', { | ||
| 1694 | - 'targets': [ | ||
| 1695 | - { | ||
| 1696 | - 'target_name': 'node_aix_shared', | ||
| 1697 | - 'type': 'shared_library', | ||
| 1698 | - 'product_name': '<(node_core_target_name)', | ||
| 1699 | - 'ldflags': ['--shared'], | ||
| 1700 | - 'product_extension': '<(shlib_suffix)', | ||
| 1701 | - 'includes': [ | ||
| 1702 | - 'node.gypi' | ||
| 1703 | - ], | ||
| 1704 | - 'dependencies': ['<(node_lib_target_name)'], | ||
| 1705 | - 'include_dirs': [ | ||
| 1706 | - 'src', | ||
| 1707 | - 'deps/v8/include', | ||
| 1708 | - ], | ||
| 1709 | - 'sources': [ | ||
| 1710 | - '<@(library_files)', | ||
| 1711 | - '<@(deps_files)', | ||
| 1712 | - 'common.gypi', | ||
| 1713 | - ], | ||
| 1714 | - 'direct_dependent_settings': { | ||
| 1715 | - 'ldflags': [ '-Wl,-brtl' ], | ||
| 1716 | - }, | ||
| 1717 | - }, | ||
| 1718 | - ] | ||
| 1719 | - }], # end aix section | ||
| 1720 | 1675 | ['OS=="win" and node_shared=="true"', { | |
| 1721 | 1676 | 'targets': [ | |
| 1722 | 1677 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments