| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ce0f498 commit a4edab8
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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': | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | 'variables': { | |
| 3 | + 'cargo%': 'cargo', | ||
| 3 | 4 | 'cargo_vendor_dir': './vendor', | |
| 4 | 5 | }, | |
| 5 | 6 | 'conditions': [ | |
@@ -48,7 +49,7 @@ | |||
| 48 | 49 | '<(node_crates_libpath)' | |
| 49 | 50 | ], | |
| 50 | 51 | 'action': [ | |
| 51 | - 'cargo', | ||
| 52 | + '<(cargo)', | ||
| 52 | 53 | 'rustc', | |
| 53 | 54 | '<@(cargo_build_flags)', | |
| 54 | 55 | '--frozen', | |
| Back | FazBrowse Home | New Git URL |
0 commit comments