| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 570952d commit 66f6ac0
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,7 @@ | |||
| 14 | 14 | 'enable_pgo_use%': '0', | |
| 15 | 15 | 'clang_profile_lib%': '', | |
| 16 | 16 | 'python%': 'python', | |
| 17 | + 'emulator%': [], | ||
| 17 | 18 | ||
| 18 | 19 | 'node_shared%': 'false', | |
| 19 | 20 | 'node_enable_experimentals%': 'false', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -117,6 +117,12 @@ | |||
| 117 | 117 | choices=valid_arch, | |
| 118 | 118 | help=f"CPU architecture to build for ({', '.join(valid_arch)})") | |
| 119 | 119 | ||
| 120 | + parser.add_argument('--emulator', | ||
| 121 | + action='store', | ||
| 122 | + dest='emulator', | ||
| 123 | + default=None, | ||
| 124 | + help='emulator command that can run executables built for the target system') | ||
| 125 | + | ||
| 120 | 126 | parser.add_argument('--cross-compiling', | |
| 121 | 127 | action='store_true', | |
| 122 | 128 | dest='cross_compiling', | |
@@ -2936,6 +2942,14 @@ def make_bin_override(): | |||
| 2936 | 2942 | # will fail to run python scripts. | |
| 2937 | 2943 | gyp_args += ['-Dpython=' + python] | |
| 2938 | 2944 | ||
| 2945 | + if options.emulator is not None: | ||
| 2946 | + if not options.cross_compiling: | ||
| 2947 | + # Note that emulator is a list so we have to quote the variable. | ||
| 2948 | + gyp_args += ['-Demulator=' + shlex.quote(options.emulator)] | ||
| 2949 | + else: | ||
| 2950 | + # TODO: perhaps use emulator for tests? | ||
| 2951 | + warn('The `--emulator` option has no effect when cross-compiling.') | ||
| 2952 | + | ||
| 2939 | 2953 | if not options.v8_disable_temporal_support or not options.shared_temporal_capi: | |
| 2940 | 2954 | cargo = os.environ.get('CARGO') | |
| 2941 | 2955 | if cargo: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1073,6 +1073,7 @@ | |||
| 1073 | 1073 | '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', | |
| 1074 | 1074 | ], | |
| 1075 | 1075 | 'action': [ | |
| 1076 | + '<@(emulator)', | ||
| 1076 | 1077 | '<(node_js2c_exec)', | |
| 1077 | 1078 | '<@(_outputs)', | |
| 1078 | 1079 | 'lib', | |
@@ -1139,6 +1140,7 @@ | |||
| 1139 | 1140 | '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc', | |
| 1140 | 1141 | ], | |
| 1141 | 1142 | 'action': [ | |
| 1143 | + '<@(emulator)', | ||
| 1142 | 1144 | '<(node_mksnapshot_exec)', | |
| 1143 | 1145 | '--build-snapshot', | |
| 1144 | 1146 | '<(node_snapshot_main)', | |
@@ -1158,6 +1160,7 @@ | |||
| 1158 | 1160 | '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc', | |
| 1159 | 1161 | ], | |
| 1160 | 1162 | 'action': [ | |
| 1163 | + '<@(emulator)', | ||
| 1161 | 1164 | '<@(_inputs)', | |
| 1162 | 1165 | '<@(_outputs)', | |
| 1163 | 1166 | ], | |
@@ -1816,6 +1819,7 @@ | |||
| 1816 | 1819 | '<(PRODUCT_DIR)/<(node_core_target_name).def', | |
| 1817 | 1820 | ], | |
| 1818 | 1821 | 'action': [ | |
| 1822 | + '<@(emulator)', | ||
| 1819 | 1823 | '<(PRODUCT_DIR)/gen_node_def.exe', | |
| 1820 | 1824 | '<@(_inputs)', | |
| 1821 | 1825 | '<@(_outputs)', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -149,6 +149,7 @@ | |||
| 149 | 149 | '<@(torque_outputs_inc)', | |
| 150 | 150 | ], | |
| 151 | 151 | 'action': [ | |
| 152 | + '<@(emulator)', | ||
| 152 | 153 | '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', | |
| 153 | 154 | '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', | |
| 154 | 155 | '-v8-root', '<(V8_ROOT)', | |
@@ -269,6 +270,7 @@ | |||
| 269 | 270 | 'action': [ | |
| 270 | 271 | '<(python)', | |
| 271 | 272 | '<(V8_ROOT)/tools/run.py', | |
| 273 | + '<@(emulator)', | ||
| 272 | 274 | '<@(_inputs)', | |
| 273 | 275 | '<@(_outputs)', | |
| 274 | 276 | ], | |
@@ -470,6 +472,7 @@ | |||
| 470 | 472 | }], | |
| 471 | 473 | ], | |
| 472 | 474 | 'action': [ | |
| 475 | + '<@(emulator)', | ||
| 473 | 476 | '>@(_inputs)', | |
| 474 | 477 | '>@(mksnapshot_flags)', | |
| 475 | 478 | ], | |
@@ -1990,6 +1993,7 @@ | |||
| 1990 | 1993 | 'action': [ | |
| 1991 | 1994 | '<(python)', | |
| 1992 | 1995 | '<(V8_ROOT)/tools/run.py', | |
| 1996 | + '<@(emulator)', | ||
| 1993 | 1997 | '<@(_inputs)', | |
| 1994 | 1998 | '<@(_outputs)', | |
| 1995 | 1999 | ], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments