| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2974deb commit 70fca2a
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -675,6 +675,10 @@ def configure_node(o): | |||
| 675 | 675 | elif target_arch in ('mips', 'mipsel'): | |
| 676 | 676 | configure_mips(o) | |
| 677 | 677 | ||
| 678 | + if flavor == 'aix': | ||
| 679 | + o['variables']['node_core_target_name'] = 'node_base' | ||
| 680 | + o['variables']['node_target_type'] = 'static_library' | ||
| 681 | + | ||
| 678 | 682 | if flavor in ('solaris', 'mac', 'linux', 'freebsd'): | |
| 679 | 683 | use_dtrace = not options.without_dtrace | |
| 680 | 684 | # Don't enable by default on linux and freebsd | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,6 +13,7 @@ | |||
| 13 | 13 | 'node_shared_openssl%': 'false', | |
| 14 | 14 | 'node_v8_options%': '', | |
| 15 | 15 | 'node_target_type%': 'executable', | |
| 16 | + 'node_core_target_name%': 'node', | ||
| 16 | 17 | 'library_files': [ | |
| 17 | 18 | 'src/node.js', | |
| 18 | 19 | 'lib/_debug_agent.js', | |
@@ -81,7 +82,7 @@ | |||
| 81 | 82 | ||
| 82 | 83 | 'targets': [ | |
| 83 | 84 | { | |
| 84 | - 'target_name': 'node', | ||
| 85 | + 'target_name': '<(node_core_target_name)', | ||
| 85 | 86 | 'type': '<(node_target_type)', | |
| 86 | 87 | ||
| 87 | 88 | 'dependencies': [ | |
@@ -673,5 +674,53 @@ | |||
| 673 | 674 | 'test/cctest/util.cc', | |
| 674 | 675 | ], | |
| 675 | 676 | } | |
| 676 | - ] # end targets | ||
| 677 | + ], # end targets | ||
| 678 | + | ||
| 679 | + 'conditions': [ | ||
| 680 | + ['OS=="aix"', { | ||
| 681 | + 'targets': [ | ||
| 682 | + { | ||
| 683 | + 'target_name': 'node', | ||
| 684 | + 'type': 'executable', | ||
| 685 | + 'dependencies': ['<(node_core_target_name)', 'node_exp'], | ||
| 686 | + | ||
| 687 | + 'include_dirs': [ | ||
| 688 | + 'src', | ||
| 689 | + 'deps/v8/include', | ||
| 690 | + ], | ||
| 691 | + | ||
| 692 | + 'sources': [ | ||
| 693 | + 'src/node_main.cc', | ||
| 694 | + '<@(library_files)', | ||
| 695 | + # node.gyp is added to the project by default. | ||
| 696 | + 'common.gypi', | ||
| 697 | + ], | ||
| 698 | + | ||
| 699 | + 'ldflags': ['-Wl,-bbigtoc,-bE:<(PRODUCT_DIR)/node.exp'], | ||
| 700 | + }, | ||
| 701 | + { | ||
| 702 | + 'target_name': 'node_exp', | ||
| 703 | + 'type': 'none', | ||
| 704 | + 'dependencies': [ | ||
| 705 | + '<(node_core_target_name)', | ||
| 706 | + ], | ||
| 707 | + 'actions': [ | ||
| 708 | + { | ||
| 709 | + 'action_name': 'expfile', | ||
| 710 | + 'inputs': [ | ||
| 711 | + '<(OBJ_DIR)' | ||
| 712 | + ], | ||
| 713 | + 'outputs': [ | ||
| 714 | + '<(PRODUCT_DIR)/node.exp' | ||
| 715 | + ], | ||
| 716 | + 'action': [ | ||
| 717 | + 'sh', 'tools/create_expfile.sh', | ||
| 718 | + '<@(_inputs)', '<@(_outputs)' | ||
| 719 | + ], | ||
| 720 | + } | ||
| 721 | + ] | ||
| 722 | + } | ||
| 723 | + ], # end targets | ||
| 724 | + }], # end aix section | ||
| 725 | + ], # end conditions block | ||
| 677 | 726 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,48 @@ | |||
| 1 | + #!/bin/sh | ||
| 2 | + # This script writes out all the exported symbols to a file | ||
| 3 | + # AIX needs this as sybmols are not exported by an | ||
| 4 | + # executable by default and we need to list | ||
| 5 | + # them specifically in order to export them | ||
| 6 | + # so that they can be used by native add-ons | ||
| 7 | + # | ||
| 8 | + # The raw symbol data is objtained by using nm on | ||
| 9 | + # the .a files which make up the node executable | ||
| 10 | + # | ||
| 11 | + # -Xany makes sure we get symbols on both | ||
| 12 | + # 32 bit and 64 bit as by default we'd only get those | ||
| 13 | + # for 32 bit | ||
| 14 | + # | ||
| 15 | + # -g selects only exported symbols | ||
| 16 | + # | ||
| 17 | + # -C, -B and -p ensure the output is in a format we | ||
| 18 | + # can easily parse and convert into the symbol we need | ||
| 19 | + # | ||
| 20 | + # -C suppresses the demangling of C++ names | ||
| 21 | + # -B gives us output in BSD format | ||
| 22 | + # -p displays the info in a standard portable output format | ||
| 23 | + # | ||
| 24 | + # We only include symbols if they are of the | ||
| 25 | + # following types and don't start with a dot. | ||
| 26 | + # | ||
| 27 | + # T - Global text symbol | ||
| 28 | + # D - Global data symbol | ||
| 29 | + # B - Gobal bss symbol. | ||
| 30 | + # | ||
| 31 | + # the final sort allows us to remove any duplicates | ||
| 32 | + # | ||
| 33 | + # We need to exclude gtest libraries as they are not | ||
| 34 | + # linked into the node executable | ||
| 35 | + # | ||
| 36 | + echo "Searching $1 to write out expfile to $2" | ||
| 37 | + | ||
| 38 | + # this special sequence must be at the start of the exp file | ||
| 39 | + echo "#!." > $2 | ||
| 40 | + | ||
| 41 | + # pull the symbols from the .a files | ||
| 42 | + find $1 -name "*.a" | grep -v gtest \ | ||
| 43 | + | xargs nm -Xany -BCpg \ | ||
| 44 | + | awk '{ | ||
| 45 | + if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && | ||
| 46 | + (substr($3,1,1) != ".")) { print $3 } | ||
| 47 | + }' \ | ||
| 48 | + | sort -u >> $2 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,6 +160,10 @@ def headers(action): | |||
| 160 | 160 | 'src/node_version.h', | |
| 161 | 161 | ], 'include/node/') | |
| 162 | 162 | ||
| 163 | + # Add the expfile that is created on AIX | ||
| 164 | + if sys.platform.startswith('aix'): | ||
| 165 | + action(['out/Release/node.exp'], 'include/node/') | ||
| 166 | + | ||
| 163 | 167 | subdir_files('deps/cares/include', 'include/node/', action) | |
| 164 | 168 | subdir_files('deps/v8/include', 'include/node/', action) | |
| 165 | 169 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments