()
| 503 | } |
| 504 | |
| 505 | func (p Port) currentSystemName() string { |
| 506 | if p.DevDep || p.HostDep { |
| 507 | // Host-side tools/dev dependencies must match the native machine, |
| 508 | // not the target toolchain. Otherwise ports like ICU may select the |
| 509 | // target config (for example aarch64) while building an x86_64 host tool. |
| 510 | hostName := strings.TrimSpace(p.ctx.Platform().GetHostName()) |
| 511 | if _, systemName, ok := strings.Cut(hostName, "-"); ok && systemName != "" { |
| 512 | return systemName |
| 513 | } |
| 514 | return runtime.GOOS |
| 515 | } |
| 516 | |
| 517 | toolchain := p.ctx.Platform().GetToolchain() |
| 518 | if toolchain != nil && strings.TrimSpace(toolchain.GetSystemName()) != "" { |
| 519 | return toolchain.GetSystemName() |
| 520 | } |
| 521 | return runtime.GOOS |
| 522 | } |
| 523 | |
| 524 | func (p Port) currentSystemProcessor() string { |
| 525 | if p.DevDep || p.HostDep { |
no test coverage detected