|
| 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 | + }, # v8_debug_helper |
| 81 | + { |
| 82 | + 'target_name': 'gen_heap_constants', |
| 83 | + 'type': 'none', |
| 84 | + 'hard_dependency': 1, |
| 85 | + 'dependencies': [ |
| 86 | + 'run_mkgrokdump', |
| 87 | + ], |
| 88 | + 'direct_dependent_settings': { |
| 89 | + 'sources': [ |
| 90 | + '<(SHARED_INTERMEDIATE_DIR)/heap-constants-gen.cc', |
| 91 | + ], |
| 92 | + }, |
| 93 | + 'actions': [ |
| 94 | + { |
| 95 | + 'action_name': 'run_gen_heap_constants', |
| 96 | + 'inputs': [ |
| 97 | + '<(V8_ROOT)/tools/debug_helper/gen-heap-constants.py', |
| 98 | + ], |
| 99 | + 'outputs': [ |
| 100 | + '<(SHARED_INTERMEDIATE_DIR)/heap-constants-gen.cc', |
| 101 | + ], |
| 102 | + 'action': [ |
| 103 | + '<(python)', |
| 104 | + '<(V8_ROOT)/tools/debug_helper/gen-heap-constants.py', |
| 105 | + '<(SHARED_INTERMEDIATE_DIR)', |
| 106 | + '<@(_outputs)', |
| 107 | + ] |
| 108 | + } |
| 109 | + ] |
| 110 | + }, # gen_heap_constants |
| 111 | + { |
| 112 | + 'target_name': 'run_mkgrokdump', |
| 113 | + 'type': 'none', |
| 114 | + 'hard_dependency': 1, |
| 115 | + 'dependencies': [ |
| 116 | + 'mkgrokdump', |
| 117 | + ], |
| 118 | + 'actions': [ |
| 119 | + { |
| 120 | + 'action_name': 'run_gen_heap_constants', |
| 121 | + 'inputs': [ |
| 122 | + '<(V8_ROOT)/tools/run.py', |
| 123 | + ], |
| 124 | + 'outputs': [ |
| 125 | + '<(SHARED_INTERMEDIATE_DIR)/v8heapconst.py', |
| 126 | + ], |
| 127 | + 'action': [ |
| 128 | + '<(python)', |
| 129 | + '<(V8_ROOT)/tools/run.py', |
| 130 | + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkgrokdump<(EXECUTABLE_SUFFIX)', |
| 131 | + '--outfile', |
| 132 | + '<@(_outputs)', |
| 133 | + ] |
| 134 | + } |
| 135 | + ] |
| 136 | + }, # run_mkgrokdump |
| 137 | + { |
| 138 | + 'target_name': 'mkgrokdump', |
| 139 | + 'type': 'executable', |
| 140 | + 'include_dirs': [ |
| 141 | + '<(V8_ROOT)', |
| 142 | + '<(V8_ROOT)/include', |
| 143 | + ], |
| 144 | + 'dependencies': [ |
| 145 | + 'abseil.gyp:abseil', |
| 146 | + 'v8.gyp:v8_snapshot', |
| 147 | + 'v8.gyp:v8_libbase', |
| 148 | + 'v8.gyp:v8_libplatform', |
| 149 | + 'v8.gyp:v8_maybe_icu', |
| 150 | + 'v8.gyp:fp16', |
| 151 | + 'v8.gyp:generate_bytecode_builtins_list', |
| 152 | + 'v8.gyp:run_torque', |
| 153 | + ], |
| 154 | + 'sources': [ |
| 155 | + '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/test/mkgrokdump/BUILD.gn" "mkgrokdump.*?sources = ")', |
| 156 | + ] |
| 157 | + }, # mkgrokdump |
| 158 | + ], |
| 159 | +} |
0 commit comments