| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2121,6 +2121,17 @@ def make_bin_override(): | |||
| 2121 | 2121 | gyp_args = ['--no-parallel', '-Dconfiguring_node=1'] | |
| 2122 | 2122 | gyp_args += ['-Dbuild_type=' + config['BUILDTYPE']] | |
| 2123 | 2123 | ||
| 2124 | + # Remove the trailing .exe from the executable name, otherwise the python.exe | ||
| 2125 | + # would be rewrote as python_host.exe due to hack in GYP for supporting cross | ||
| 2126 | + # compilation on Windows. | ||
| 2127 | + # See https://github.com/nodejs/node/pull/32867 for related change. | ||
| 2128 | + python = sys.executable | ||
| 2129 | + if flavor == 'win' and python.lower().endswith('.exe'): | ||
| 2130 | + python = python[:-4] | ||
| 2131 | + # Always set 'python' variable, otherwise environments that only have python3 | ||
| 2132 | + # will fail to run python scripts. | ||
| 2133 | + gyp_args += ['-Dpython=' + python] | ||
| 2134 | + | ||
| 2124 | 2135 | if options.use_ninja: | |
| 2125 | 2136 | gyp_args += ['-f', 'ninja-' + flavor] | |
| 2126 | 2137 | elif flavor == 'win' and sys.platform != 'msys': | |
@@ -2133,10 +2144,6 @@ def make_bin_override(): | |||
| 2133 | 2144 | os.path.islink('./compile_commands.json') and os.unlink('./compile_commands.json') | |
| 2134 | 2145 | os.symlink('./out/' + config['BUILDTYPE'] + '/compile_commands.json', './compile_commands.json') | |
| 2135 | 2146 | ||
| 2136 | - # override the variable `python` defined in common.gypi | ||
| 2137 | - if bin_override is not None: | ||
| 2138 | - gyp_args += ['-Dpython=' + sys.executable] | ||
| 2139 | - | ||
| 2140 | 2147 | # pass the leftover non-whitespace positional arguments to GYP | |
| 2141 | 2148 | gyp_args += [arg for arg in args if not str.isspace(arg)] | |
| 2142 | 2149 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -762,7 +762,7 @@ | |||
| 762 | 762 | '<(fipsmodule)', | |
| 763 | 763 | ], | |
| 764 | 764 | 'action': [ | |
| 765 | - 'python', 'tools/copyfile.py', | ||
| 765 | + '<(python)', 'tools/copyfile.py', | ||
| 766 | 766 | '<(fipsmodule_internal)', | |
| 767 | 767 | '<(fipsmodule)', | |
| 768 | 768 | ], | |
@@ -772,7 +772,7 @@ | |||
| 772 | 772 | 'inputs': [ '<(opensslconfig)', ], | |
| 773 | 773 | 'outputs': [ '<(opensslconfig_internal)', ], | |
| 774 | 774 | 'action': [ | |
| 775 | - 'python', 'tools/enable_fips_include.py', | ||
| 775 | + '<(python)', 'tools/enable_fips_include.py', | ||
| 776 | 776 | '<(opensslconfig)', | |
| 777 | 777 | '<(opensslconfig_internal)', | |
| 778 | 778 | '<(fipsconfig)', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -438,6 +438,7 @@ def _BuildCommandLineForRuleRaw( | |||
| 438 | 438 | # Support a mode for using cmd directly. | |
| 439 | 439 | # Convert any paths to native form (first element is used directly). | |
| 440 | 440 | # TODO(quote): regularize quoting path names throughout the module | |
| 441 | + command[1] = '"%s"' % command[1] | ||
| 441 | 442 | arguments = ['"%s"' % i for i in arguments] | |
| 442 | 443 | # Collapse into a single command. | |
| 443 | 444 | return input_dir_preamble + " ".join(command + arguments) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,7 @@ | |||
| 41 | 41 | 'has_valgrind%': 0, | |
| 42 | 42 | 'coverage%': 0, | |
| 43 | 43 | 'v8_target_arch%': '<(target_arch)', | |
| 44 | - 'v8_host_byteorder%': '<!(python -c "import sys; print(sys.byteorder)")', | ||
| 44 | + 'v8_host_byteorder%': '<!("<(python)" -c "import sys; print(sys.byteorder)")', | ||
| 45 | 45 | 'force_dynamic_crt%': 0, | |
| 46 | 46 | ||
| 47 | 47 | # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP | |
| Back | FazBrowse Home | New Git URL |
0 commit comments