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' ,
@@ -2947,6 +2953,14 @@ def make_bin_override():
29472953# will fail to run python scripts.
29482954gyp_args += ['-Dpython=' + python ]
29492955
2956+ if options .emulator is not None :
2957+ if not options .cross_compiling :
2958+ # Note that emulator is a list so we have to quote the variable.
2959+ gyp_args += ['-Demulator=' + shlex .quote (options .emulator )]
2960+ else :
2961+ # TODO: perhaps use emulator for tests?
2962+ warn ('The `--emulator` option has no effect when cross-compiling.' )
2963+
29502964if not options .v8_disable_temporal_support or not options .shared_temporal_capi :
29512965 cargo = os .environ .get ('CARGO' )
29522966 if cargo :
Original file line number Diff line number Diff line change 10921092 '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc' ,
10931093 ],
10941094 'action' : [
1095+ '<@(emulator)' ,
10951096 '<(node_js2c_exec)' ,
10961097 '<@(_outputs)' ,
10971098 'lib' ,
11581159 '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc' ,
11591160 ],
11601161 'action' : [
1162+ '<@(emulator)' ,
11611163 '<(node_mksnapshot_exec)' ,
11621164 '--build-snapshot' ,
11631165 '<(node_snapshot_main)' ,
11771179 '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc' ,
11781180 ],
11791181 'action' : [
1182+ '<@(emulator)' ,
11801183 '<@(_inputs)' ,
11811184 '<@(_outputs)' ,
11821185 ],
18351838 '<(PRODUCT_DIR)/<(node_core_target_name).def' ,
18361839 ],
18371840 'action' : [
1841+ '<@(emulator)' ,
18381842 '<(PRODUCT_DIR)/gen_node_def.exe' ,
18391843 '<@(_inputs)' ,
18401844 '<@(_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