File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 'enable_pgo_use%' : '0' ,
1515 'clang_profile_lib%' : '' ,
1616 'python%' : 'python' ,
17+ 'emulator%' : [],
1718
1819 'node_shared%' : 'false' ,
1920 'node_enable_experimentals%' : 'false' ,
Original file line number Diff line number Diff line change 117117 choices = valid_arch ,
118118 help = f"CPU architecture to build for ({ ', ' .join (valid_arch )} )" )
119119
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+
120126parser .add_argument ('--cross-compiling' ,
121127 action = 'store_true' ,
122128 dest = 'cross_compiling' ,
@@ -2936,6 +2942,14 @@ def make_bin_override():
29362942# will fail to run python scripts.
29372943gyp_args += ['-Dpython=' + python ]
29382944
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+
29392953if not options .v8_disable_temporal_support or not options .shared_temporal_capi :
29402954 cargo = os .environ .get ('CARGO' )
29412955 if cargo :
Original file line number Diff line number Diff line change 10731073 '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc' ,
10741074 ],
10751075 'action' : [
1076+ '<@(emulator)' ,
10761077 '<(node_js2c_exec)' ,
10771078 '<@(_outputs)' ,
10781079 'lib' ,
11391140 '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc' ,
11401141 ],
11411142 'action' : [
1143+ '<@(emulator)' ,
11421144 '<(node_mksnapshot_exec)' ,
11431145 '--build-snapshot' ,
11441146 '<(node_snapshot_main)' ,
11581160 '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc' ,
11591161 ],
11601162 'action' : [
1163+ '<@(emulator)' ,
11611164 '<@(_inputs)' ,
11621165 '<@(_outputs)' ,
11631166 ],
18161819 '<(PRODUCT_DIR)/<(node_core_target_name).def' ,
18171820 ],
18181821 'action' : [
1822+ '<@(emulator)' ,
18191823 '<(PRODUCT_DIR)/gen_node_def.exe' ,
18201824 '<@(_inputs)' ,
18211825 '<@(_outputs)' ,
Original file line number Diff line number Diff line change 149149 '<@(torque_outputs_inc)' ,
150150 ],
151151 'action' : [
152+ '<@(emulator)' ,
152153 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)' ,
153154 '-o' , '<(SHARED_INTERMEDIATE_DIR)/torque-generated' ,
154155 '-v8-root' , '<(V8_ROOT)' ,
269270 'action' : [
270271 '<(python)' ,
271272 '<(V8_ROOT)/tools/run.py' ,
273+ '<@(emulator)' ,
272274 '<@(_inputs)' ,
273275 '<@(_outputs)' ,
274276 ],
470472 }],
471473 ],
472474 'action' : [
475+ '<@(emulator)' ,
473476 '>@(_inputs)' ,
474477 '>@(mksnapshot_flags)' ,
475478 ],
19901993 'action' : [
19911994 '<(python)' ,
19921995 '<(V8_ROOT)/tools/run.py' ,
1996+ '<@(emulator)' ,
19931997 '<@(_inputs)' ,
19941998 '<@(_outputs)' ,
19951999 ],
You can’t perform that action at this time.
0 commit comments