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' ,
@@ -2633,6 +2639,14 @@ def make_bin_override():
26332639# will fail to run python scripts.
26342640gyp_args += ['-Dpython=' + python ]
26352641
2642+ if options .emulator is not None :
2643+ if not options .cross_compiling :
2644+ # Note that emulator is a list so we have to quote the variable.
2645+ gyp_args += ['-Demulator=' + shlex .quote (options .emulator )]
2646+ else :
2647+ # TODO: perhaps use emulator for tests?
2648+ warn ('The `--emulator` option has no effect when cross-compiling.' )
2649+
26362650if options .use_ninja :
26372651 gyp_args += ['-f' , 'ninja-' + flavor ]
26382652elif flavor == 'win' and sys .platform != 'msys' :
Original file line number Diff line number Diff line change 750750 '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc' ,
751751 ],
752752 'action' : [
753+ '<@(emulator)' ,
753754 '<(node_mksnapshot_exec)' ,
754755 '--build-snapshot' ,
755756 '<(node_snapshot_main)' ,
769770 '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc' ,
770771 ],
771772 'action' : [
773+ '<@(emulator)' ,
772774 '<@(_inputs)' ,
773775 '<@(_outputs)' ,
774776 ],
11051107 '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc' ,
11061108 ],
11071109 'action' : [
1110+ '<@(emulator)' ,
11081111 '<(node_js2c_exec)' ,
11091112 '<@(_outputs)' ,
11101113 'lib' ,
16851688 '<(PRODUCT_DIR)/<(node_core_target_name).def' ,
16861689 ],
16871690 'action' : [
1691+ '<@(emulator)' ,
16881692 '<(PRODUCT_DIR)/gen_node_def.exe' ,
16891693 '<@(_inputs)' ,
16901694 '<@(_outputs)' ,
Original file line number Diff line number Diff line change 144144 '<@(torque_outputs_inc)' ,
145145 ],
146146 'action' : [
147+ '<@(emulator)' ,
147148 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)' ,
148149 '-o' , '<(SHARED_INTERMEDIATE_DIR)/torque-generated' ,
149150 '-v8-root' , '<(V8_ROOT)' ,
264265 'action' : [
265266 '<(python)' ,
266267 '<(V8_ROOT)/tools/run.py' ,
268+ '<@(emulator)' ,
267269 '<@(_inputs)' ,
268270 '<@(_outputs)' ,
269271 ],
492494 }],
493495 ],
494496 'action' : [
497+ '<@(emulator)' ,
495498 '>@(_inputs)' ,
496499 '>@(mksnapshot_flags)' ,
497500 ],
19811984 'action' : [
19821985 '<(python)' ,
19831986 '<(V8_ROOT)/tools/run.py' ,
1987+ '<@(emulator)' ,
19841988 '<@(_inputs)' ,
19851989 '<@(_outputs)' ,
19861990 ],
You can’t perform that action at this time.
0 commit comments