Lines 404-414
def detect_rustc_target(
Link Here
|
404 |
if len(narrowed) == 1: |
404 |
if len(narrowed) == 1: |
405 |
return narrowed[0].rust_target |
405 |
return narrowed[0].rust_target |
406 |
|
406 |
|
407 |
# Finally, see if the vendor can be used to disambiguate. |
407 |
# See if the vendor can be used to disambiguate. |
408 |
narrowed = [c for c in candidates if c.target.vendor == host_or_target.vendor] |
408 |
narrowed = [c for c in candidates if c.target.vendor == host_or_target.vendor] |
409 |
if len(narrowed) == 1: |
409 |
if len(narrowed) == 1: |
410 |
return narrowed[0].rust_target |
410 |
return narrowed[0].rust_target |
411 |
|
411 |
|
|
|
412 |
# Finally, check for vendor gentoo in the target triple. |
413 |
vendor_aliases = {"unknown": ("gentoo")} |
414 |
narrowed = [ |
415 |
c |
416 |
for c in candidates |
417 |
if host_or_target.vendor in vendor_aliases.get(c.target.vendor, ()) |
418 |
] |
419 |
if len(narrowed) == 1: |
420 |
return narrowed[0].rust_target |
421 |
|
412 |
return None |
422 |
return None |
413 |
|
423 |
|
414 |
rustc_target = find_candidate(candidates) |
424 |
rustc_target = find_candidate(candidates) |