| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 363912a commit 1124c06
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', | |
@@ -492,17 +489,7 @@ | |||
| 492 | 489 | }], | |
| 493 | 490 | [ 'node_shared=="true"', { | |
| 494 | 491 | 'node_target_type%': 'shared_library', | |
| 495 | - 'conditions': [ | ||
| 496 | - ['OS in "aix os400"', { | ||
| 497 | - # For AIX, always generate static library first, | ||
| 498 | - # It needs an extra step to generate exp and | ||
| 499 | - # then use both static lib and exp to create | ||
| 500 | - # shared lib. | ||
| 501 | - 'node_intermediate_lib_type': 'static_library', | ||
| 502 | - }, { | ||
| 503 | - 'node_intermediate_lib_type': 'shared_library', | ||
| 504 | - }], | ||
| 505 | - ], | ||
| 492 | + 'node_lib_type': 'shared_library', | ||
| 506 | 493 | }, { | |
| 507 | 494 | 'node_target_type%': 'executable', | |
| 508 | 495 | }], | |
@@ -614,6 +601,10 @@ | |||
| 614 | 601 | 'src/node_main.cc' | |
| 615 | 602 | ], | |
| 616 | 603 | ||
| 604 | + 'dependencies': [ | ||
| 605 | + '<(node_lib_target_name)', | ||
| 606 | + ], | ||
| 607 | + | ||
| 617 | 608 | 'msvs_settings': { | |
| 618 | 609 | 'VCLinkerTool': { | |
| 619 | 610 | 'GenerateMapFile': 'true', # /MAP | |
@@ -646,25 +637,13 @@ | |||
| 646 | 637 | 'WARNING_CFLAGS': [ '-Werror' ], | |
| 647 | 638 | }, | |
| 648 | 639 | }], | |
| 649 | - [ 'node_intermediate_lib_type=="static_library" and ' | ||
| 650 | - 'node_shared=="true" and OS in "aix os400"', { | ||
| 651 | - # For AIX, shared lib is linked by static lib and .exp. In the | ||
| 652 | - # case here, the executable needs to link to shared lib. | ||
| 653 | - # Therefore, use 'node_aix_shared' target to generate the | ||
| 654 | - # shared lib and then executable. | ||
| 655 | - 'dependencies': [ 'node_aix_shared' ], | ||
| 656 | - }, { | ||
| 657 | - 'dependencies': [ '<(node_lib_target_name)' ], | ||
| 658 | - 'conditions': [ | ||
| 659 | - ['OS=="win" and node_shared=="true"', { | ||
| 660 | - 'dependencies': ['generate_node_def'], | ||
| 661 | - 'msvs_settings': { | ||
| 662 | - 'VCLinkerTool': { | ||
| 663 | - 'ModuleDefinitionFile': '<(PRODUCT_DIR)/<(node_core_target_name).def', | ||
| 664 | - }, | ||
| 665 | - }, | ||
| 666 | - }], | ||
| 667 | - ], | ||
| 640 | + ['node_shared=="true" and OS=="win"', { | ||
| 641 | + 'dependencies': ['generate_node_def'], | ||
| 642 | + 'msvs_settings': { | ||
| 643 | + 'VCLinkerTool': { | ||
| 644 | + 'ModuleDefinitionFile': '<(PRODUCT_DIR)/<(node_core_target_name).def', | ||
| 645 | + }, | ||
| 646 | + }, | ||
| 668 | 647 | }], | |
| 669 | 648 | [ 'node_shared=="false"', { | |
| 670 | 649 | # Keep this whole-archive section in sync with the `node_lib` target below. | |
@@ -1095,7 +1074,7 @@ | |||
| 1095 | 1074 | }, # node_base | |
| 1096 | 1075 | { | |
| 1097 | 1076 | 'target_name': '<(node_lib_target_name)', | |
| 1098 | - 'type': '<(node_intermediate_lib_type)', | ||
| 1077 | + 'type': '<(node_lib_type)', | ||
| 1099 | 1078 | 'includes': [ | |
| 1100 | 1079 | 'node.gypi', | |
| 1101 | 1080 | ], | |
@@ -1215,7 +1194,10 @@ | |||
| 1215 | 1194 | }, | |
| 1216 | 1195 | }], | |
| 1217 | 1196 | ['node_shared=="true" and OS in "aix os400"', { | |
| 1218 | - 'product_name': 'node_base', | ||
| 1197 | + 'ldflags': ['--shared'], | ||
| 1198 | + 'direct_dependent_settings': { | ||
| 1199 | + 'ldflags': [ '-Wl,-brtl' ], | ||
| 1200 | + }, | ||
| 1219 | 1201 | }], | |
| 1220 | 1202 | [ 'node_shared=="true" and OS=="win"', { | |
| 1221 | 1203 | 'sources': [ | |
@@ -1797,33 +1779,6 @@ | |||
| 1797 | 1779 | ], # end targets | |
| 1798 | 1780 | ||
| 1799 | 1781 | 'conditions': [ | |
| 1800 | - ['OS in "aix os400" and node_shared=="true"', { | ||
| 1801 | - 'targets': [ | ||
| 1802 | - { | ||
| 1803 | - 'target_name': 'node_aix_shared', | ||
| 1804 | - 'type': 'shared_library', | ||
| 1805 | - 'product_name': '<(node_core_target_name)', | ||
| 1806 | - 'ldflags': ['--shared'], | ||
| 1807 | - 'product_extension': '<(shlib_suffix)', | ||
| 1808 | - 'includes': [ | ||
| 1809 | - 'node.gypi' | ||
| 1810 | - ], | ||
| 1811 | - 'dependencies': ['<(node_lib_target_name)'], | ||
| 1812 | - 'include_dirs': [ | ||
| 1813 | - 'src', | ||
| 1814 | - 'deps/v8/include', | ||
| 1815 | - ], | ||
| 1816 | - 'sources': [ | ||
| 1817 | - '<@(library_files)', | ||
| 1818 | - '<@(deps_files)', | ||
| 1819 | - 'common.gypi', | ||
| 1820 | - ], | ||
| 1821 | - 'direct_dependent_settings': { | ||
| 1822 | - 'ldflags': [ '-Wl,-brtl' ], | ||
| 1823 | - }, | ||
| 1824 | - }, | ||
| 1825 | - ] | ||
| 1826 | - }], # end aix section | ||
| 1827 | 1782 | ['OS=="win" and node_shared=="true"', { | |
| 1828 | 1783 | 'targets': [ | |
| 1829 | 1784 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments