GeezerVison is showing github.com — tools: add v8windbg target · nodejs/node@377bdb9
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: configure.py +9Lines changed: 9 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 628 | 628 | default=None, | 629 | 629 | help=argparse.SUPPRESS) # Unsupported, undocumented. | 630 | 630 |
| | 631 | +parser.add_argument('--enable-v8windbg', | | 632 | + action='store_true', | | 633 | + dest='enable_v8windbg', | | 634 | + default=None, | | 635 | + help=argparse.SUPPRESS) # Undocumented. | | 636 | + | 631 | 637 | parser.add_argument('--enable-trace-maps', | 632 | 638 | action='store_true', | 633 | 639 | dest='trace_maps', | @@ -1734,10 +1740,13 @@ def configure_v8(o, configs): | 1734 | 1740 | o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) | 1735 | 1741 | o['variables']['force_dynamic_crt'] = 1 if options.shared else 0 | 1736 | 1742 | o['variables']['node_enable_d8'] = b(options.enable_d8) | | 1743 | + o['variables']['node_enable_v8windbg'] = b(options.enable_v8windbg) | 1737 | 1744 | if options.enable_d8: | 1738 | 1745 | o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp. | 1739 | 1746 | if options.without_bundled_v8 and options.enable_d8: | 1740 | 1747 | raise Exception('--enable-d8 is incompatible with --without-bundled-v8.') | | 1748 | + if options.without_bundled_v8 and options.enable_v8windbg: | | 1749 | + raise Exception('--enable-v8windbg is incompatible with --without-bundled-v8.') | 1741 | 1750 | if options.static_zoslib_gyp: | 1742 | 1751 | o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp | 1743 | 1752 | if flavor != 'linux' and options.v8_enable_hugepage: | |
Collapse file Copy file name to clipboardExpand all lines: node.gypi +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 85 | 85 | [ 'node_enable_d8=="true"', { | 86 | 86 | 'dependencies': [ 'tools/v8_gypfiles/d8.gyp:d8' ], | 87 | 87 | }], | | 88 | + [ 'node_enable_v8windbg=="true"', { | | 89 | + 'dependencies': [ 'tools/v8_gypfiles/v8windbg.gyp:build_v8windbg' ], | | 90 | + }], | 88 | 91 | [ 'node_use_bundled_v8=="true"', { | 89 | 92 | 'dependencies': [ | 90 | 93 | 'tools/v8_gypfiles/v8.gyp:v8_snapshot', | |
Collapse file Copy file name to clipboard +168Lines changed: 168 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +{ | | 2 | + 'variables': { | | 3 | + 'V8_ROOT': '../../deps/v8', | | 4 | + 'v8_code': 1, | | 5 | + }, | | 6 | + 'includes': ['toolchain.gypi', 'features.gypi'], | | 7 | + 'targets': [ | | 8 | + { | | 9 | + # Intermediate target to build v8windbg.dll. | | 10 | + # This prevents the dependent settings like node.gypi to link the v8windbg.dll | | 11 | + # to the dependent. v8windbg.dll is only supposed to be loaded by WinDbg at debug time. | | 12 | + 'target_name': 'build_v8windbg', | | 13 | + 'type': 'none', | | 14 | + 'hard_dependency': 1, | | 15 | + 'dependencies': [ | | 16 | + 'v8windbg', | | 17 | + ], | | 18 | + }, # build_v8windbg | | 19 | + { | | 20 | + 'target_name': 'v8windbg', | | 21 | + 'type': 'shared_library', | | 22 | + 'include_dirs': [ | | 23 | + '<(V8_ROOT)', | | 24 | + '<(V8_ROOT)/include', | | 25 | + ], | | 26 | + 'dependencies': [ | | 27 | + 'v8_debug_helper', | | 28 | + 'v8.gyp:v8_libbase', | | 29 | + ], | | 30 | + 'sources': [ | | 31 | + '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/tools/v8windbg/BUILD.gn" "v8windbg_base.*?sources = ")', | | 32 | + '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/tools/v8windbg/BUILD.gn" "v8_shared_library..v8windbg.*?sources = ")', | | 33 | + ], | | 34 | + "link_settings": { | | 35 | + "libraries": [ | | 36 | + "-lDbgEng.lib", | | 37 | + "-lDbgModel.lib", | | 38 | + "-lRuntimeObject.lib", | | 39 | + "-lcomsuppwd.lib", | | 40 | + ], | | 41 | + }, | | 42 | + }, # v8windbg | | 43 | + { | | 44 | + 'target_name': 'v8_debug_helper', | | 45 | + 'type': 'static_library', | | 46 | + 'include_dirs': [ | | 47 | + '<(V8_ROOT)', | | 48 | + '<(V8_ROOT)/include', | | 49 | + ], | | 50 | + 'dependencies': [ | | 51 | + 'gen_heap_constants', | | 52 | + | | 53 | + 'abseil.gyp:abseil', | | 54 | + 'v8.gyp:generate_bytecode_builtins_list', | | 55 | + 'v8.gyp:run_torque', | | 56 | + 'v8.gyp:v8_maybe_icu', | | 57 | + 'v8.gyp:fp16', | | 58 | + 'v8.gyp:v8_libbase', | | 59 | + 'v8.gyp:v8_snapshot', | | 60 | + ], | | 61 | + 'sources': [ | | 62 | + '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/tools/debug_helper/BUILD.gn" "\"v8_debug_helper_internal\".*?sources = ")', | | 63 | + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.cc", | | 64 | + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.h", | | 65 | + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/debug-macros.cc", | | 66 | + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/debug-macros.h", | | 67 | + "<(SHARED_INTERMEDIATE_DIR)/torque-generated/instance-types.h", | | 68 | + ], | | 69 | + # Enable RTTI //build/config/compiler:rtti | | 70 | + 'cflags_cc': [ '-frtti' ], | | 71 | + 'cflags_cc!': [ '-fno-rtti' ], | | 72 | + 'xcode_settings': { | | 73 | + 'GCC_ENABLE_CPP_RTTI': 'YES', # -frtti | | 74 | + }, | | 75 | + 'msvs_settings': { | | 76 | + 'VCCLCompilerTool': { | | 77 | + 'RuntimeTypeInfo': 'true', | | 78 | + }, | | 79 | + }, | | 80 | + 'configurations': { | | 81 | + 'Release': { # Override target_defaults.Release in common.gypi | | 82 | + 'msvs_settings': { | | 83 | + 'VCCLCompilerTool': { | | 84 | + 'RuntimeTypeInfo': 'true', | | 85 | + }, | | 86 | + }, | | 87 | + }, | | 88 | + }, | | 89 | + }, # v8_debug_helper | | 90 | + { | | 91 | + 'target_name': 'gen_heap_constants', | | 92 | + 'type': 'none', | | 93 | + 'hard_dependency': 1, | | 94 | + 'dependencies': [ | | 95 | + 'run_mkgrokdump', | | 96 | + ], | | 97 | + 'direct_dependent_settings': { | | 98 | + 'sources': [ | | 99 | + '<(SHARED_INTERMEDIATE_DIR)/heap-constants-gen.cc', | | 100 | + ], | | 101 | + }, | | 102 | + 'actions': [ | | 103 | + { | | 104 | + 'action_name': 'run_gen_heap_constants', | | 105 | + 'inputs': [ | | 106 | + '<(V8_ROOT)/tools/debug_helper/gen-heap-constants.py', | | 107 | + ], | | 108 | + 'outputs': [ | | 109 | + '<(SHARED_INTERMEDIATE_DIR)/heap-constants-gen.cc', | | 110 | + ], | | 111 | + 'action': [ | | 112 | + '<(python)', | | 113 | + '<(V8_ROOT)/tools/debug_helper/gen-heap-constants.py', | | 114 | + '<(SHARED_INTERMEDIATE_DIR)', | | 115 | + '<@(_outputs)', | | 116 | + ] | | 117 | + } | | 118 | + ] | | 119 | + }, # gen_heap_constants | | 120 | + { | | 121 | + 'target_name': 'run_mkgrokdump', | | 122 | + 'type': 'none', | | 123 | + 'hard_dependency': 1, | | 124 | + 'dependencies': [ | | 125 | + 'mkgrokdump', | | 126 | + ], | | 127 | + 'actions': [ | | 128 | + { | | 129 | + 'action_name': 'run_gen_heap_constants', | | 130 | + 'inputs': [ | | 131 | + '<(V8_ROOT)/tools/run.py', | | 132 | + ], | | 133 | + 'outputs': [ | | 134 | + '<(SHARED_INTERMEDIATE_DIR)/v8heapconst.py', | | 135 | + ], | | 136 | + 'action': [ | | 137 | + '<(python)', | | 138 | + '<(V8_ROOT)/tools/run.py', | | 139 | + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkgrokdump<(EXECUTABLE_SUFFIX)', | | 140 | + '--outfile', | | 141 | + '<@(_outputs)', | | 142 | + ] | | 143 | + } | | 144 | + ] | | 145 | + }, # run_mkgrokdump | | 146 | + { | | 147 | + 'target_name': 'mkgrokdump', | | 148 | + 'type': 'executable', | | 149 | + 'include_dirs': [ | | 150 | + '<(V8_ROOT)', | | 151 | + '<(V8_ROOT)/include', | | 152 | + ], | | 153 | + 'dependencies': [ | | 154 | + 'abseil.gyp:abseil', | | 155 | + 'v8.gyp:v8_snapshot', | | 156 | + 'v8.gyp:v8_libbase', | | 157 | + 'v8.gyp:v8_libplatform', | | 158 | + 'v8.gyp:v8_maybe_icu', | | 159 | + 'v8.gyp:fp16', | | 160 | + 'v8.gyp:generate_bytecode_builtins_list', | | 161 | + 'v8.gyp:run_torque', | | 162 | + ], | | 163 | + 'sources': [ | | 164 | + '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/test/mkgrokdump/BUILD.gn" "mkgrokdump.*?sources = ")', | | 165 | + ] | | 166 | + }, # mkgrokdump | | 167 | + ], | | 168 | +} |
Collapse file Copy file name to clipboardExpand all lines: vcbuild.bat +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -73,6 +73,7 @@ set doc= | 73 | 73 | set extra_msbuild_args= | 74 | 74 | set compile_commands= | 75 | 75 | set cfg= | | 76 | +set v8windbg= | 76 | 77 | set exit_code=0 | 77 | 78 |
| 78 | 79 | :next-arg | @@ -97,6 +98,7 @@ if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok | 97 | 98 | if /i "%1"=="nonpm" set nonpm=1&goto arg-ok | 98 | 99 | if /i "%1"=="nocorepack" set nocorepack=1&goto arg-ok | 99 | 100 | if /i "%1"=="ltcg" set ltcg=1&goto arg-ok | | 101 | +if /i "%1"=="v8windbg" set v8windbg=1&goto arg-ok | 100 | 102 | if /i "%1"=="licensertf" set licensertf=1&goto arg-ok | 101 | 103 | if /i "%1"=="test" set test_args=%test_args% %common_test_suites%&set lint_cpp=1&set lint_js=1&set lint_md=1&goto arg-ok | 102 | 104 | if /i "%1"=="test-ci-native" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap %CI_NATIVE_SUITES% %CI_DOC%&set build_addons=1&set build_js_native_api_tests=1&set build_node_api_tests=1&set cctest_args=%cctest_args% --gtest_output=xml:cctest.junit.xml&goto arg-ok | @@ -213,6 +215,7 @@ if defined DEBUG_HELPER set configure_flags=%configure_flags% --verbose | 213 | 215 | if defined ccache_path set configure_flags=%configure_flags% --use-ccache-win | 214 | 216 | if defined compile_commands set configure_flags=%configure_flags% -C | 215 | 217 | if defined cfg set configure_flags=%configure_flags% --control-flow-guard | | 218 | +if defined v8windbg set configure_flags=%configure_flags% --enable-v8windbg | 216 | 219 |
| 217 | 220 | if "%target_arch%"=="x86" ( | 218 | 221 | echo "32-bit Windows builds are not supported anymore." | |
|