@@ -1452,7 +1452,9 @@ def get_cargo_version(cargo): |
1452 | 1452 | except OSError: |
1453 | 1453 | error('''No acceptable cargo found! |
1454 | 1454 |
|
1455 | | - Please make sure you have cargo installed on your system.''') |
| 1455 | + Please make sure you have cargo installed on your system and/or |
| 1456 | + consider adjusting the CARGO environment variable if you have installed |
| 1457 | + it in a non-standard prefix.''') |
1456 | 1458 |
|
1457 | 1459 | with proc: |
1458 | 1460 | cargo_ret = to_utf8(proc.communicate()[0]) |
@@ -1540,8 +1542,9 @@ def check_compiler(o): |
1540 | 1542 | # Minimum cargo and rustc versions should match values in BUILDING.md. |
1541 | 1543 | min_cargo_ver_tuple = (1, 82) |
1542 | 1544 | min_rustc_ver_tuple = (1, 82) |
1543 | | - cargo_ver = get_cargo_version('cargo') |
1544 | | - print_verbose(f'Detected cargo: {cargo_ver}') |
| 1545 | + cargo = os.environ.get('CARGO', 'cargo') |
| 1546 | + cargo_ver = get_cargo_version(cargo) |
| 1547 | + print_verbose(f'Detected cargo (CARGO={cargo}): {cargo_ver}') |
1545 | 1548 | cargo_ver_tuple = tuple(map(int, cargo_ver.split('.'))) |
1546 | 1549 | if cargo_ver_tuple < min_cargo_ver_tuple: |
1547 | 1550 | warn(f'cargo {cargo_ver} too old, need cargo {".".join(map(str, min_cargo_ver_tuple))}') |
@@ -2751,6 +2754,11 @@ def make_bin_override(): |
2751 | 2754 | # will fail to run python scripts. |
2752 | 2755 | gyp_args += ['-Dpython=' + python] |
2753 | 2756 |
|
| 2757 | +if options.v8_enable_temporal_support and not options.shared_temporal_capi: |
| 2758 | + cargo = os.environ.get('CARGO') |
| 2759 | + if cargo: |
| 2760 | + gyp_args += ['-Dcargo=' + cargo] |
| 2761 | + |
2754 | 2762 | if options.use_ninja: |
2755 | 2763 | gyp_args += ['-f', 'ninja-' + flavor] |
2756 | 2764 | elif flavor == 'win' and sys.platform != 'msys': |
|