| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 291c127 commit 32174a7
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', | |
@@ -2633,6 +2639,14 @@ def make_bin_override(): | |||
| 2633 | 2639 | # will fail to run python scripts. | |
| 2634 | 2640 | gyp_args += ['-Dpython=' + python] | |
| 2635 | 2641 | ||
| 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 | + | ||
| 2636 | 2650 | if options.use_ninja: | |
| 2637 | 2651 | gyp_args += ['-f', 'ninja-' + flavor] | |
| 2638 | 2652 | elif flavor == 'win' and sys.platform != 'msys': | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -750,6 +750,7 @@ | |||
| 750 | 750 | '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc', | |
| 751 | 751 | ], | |
| 752 | 752 | 'action': [ | |
| 753 | + '<@(emulator)', | ||
| 753 | 754 | '<(node_mksnapshot_exec)', | |
| 754 | 755 | '--build-snapshot', | |
| 755 | 756 | '<(node_snapshot_main)', | |
@@ -769,6 +770,7 @@ | |||
| 769 | 770 | '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc', | |
| 770 | 771 | ], | |
| 771 | 772 | 'action': [ | |
| 773 | + '<@(emulator)', | ||
| 772 | 774 | '<@(_inputs)', | |
| 773 | 775 | '<@(_outputs)', | |
| 774 | 776 | ], | |
@@ -1105,6 +1107,7 @@ | |||
| 1105 | 1107 | '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', | |
| 1106 | 1108 | ], | |
| 1107 | 1109 | 'action': [ | |
| 1110 | + '<@(emulator)', | ||
| 1108 | 1111 | '<(node_js2c_exec)', | |
| 1109 | 1112 | '<@(_outputs)', | |
| 1110 | 1113 | 'lib', | |
@@ -1685,6 +1688,7 @@ | |||
| 1685 | 1688 | '<(PRODUCT_DIR)/<(node_core_target_name).def', | |
| 1686 | 1689 | ], | |
| 1687 | 1690 | 'action': [ | |
| 1691 | + '<@(emulator)', | ||
| 1688 | 1692 | '<(PRODUCT_DIR)/gen_node_def.exe', | |
| 1689 | 1693 | '<@(_inputs)', | |
| 1690 | 1694 | '<@(_outputs)', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -144,6 +144,7 @@ | |||
| 144 | 144 | '<@(torque_outputs_inc)', | |
| 145 | 145 | ], | |
| 146 | 146 | 'action': [ | |
| 147 | + '<@(emulator)', | ||
| 147 | 148 | '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', | |
| 148 | 149 | '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', | |
| 149 | 150 | '-v8-root', '<(V8_ROOT)', | |
@@ -264,6 +265,7 @@ | |||
| 264 | 265 | 'action': [ | |
| 265 | 266 | '<(python)', | |
| 266 | 267 | '<(V8_ROOT)/tools/run.py', | |
| 268 | + '<@(emulator)', | ||
| 267 | 269 | '<@(_inputs)', | |
| 268 | 270 | '<@(_outputs)', | |
| 269 | 271 | ], | |
@@ -492,6 +494,7 @@ | |||
| 492 | 494 | }], | |
| 493 | 495 | ], | |
| 494 | 496 | 'action': [ | |
| 497 | + '<@(emulator)', | ||
| 495 | 498 | '>@(_inputs)', | |
| 496 | 499 | '>@(mksnapshot_flags)', | |
| 497 | 500 | ], | |
@@ -1981,6 +1984,7 @@ | |||
| 1981 | 1984 | 'action': [ | |
| 1982 | 1985 | '<(python)', | |
| 1983 | 1986 | '<(V8_ROOT)/tools/run.py', | |
| 1987 | + '<@(emulator)', | ||
| 1984 | 1988 | '<@(_inputs)', | |
| 1985 | 1989 | '<@(_outputs)', | |
| 1986 | 1990 | ], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments