MCPcopy Create free account
hub / github.com/celer-pkg/celer / currentSystemName

Method currentSystemName

configs/port.go:505–522  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

503}
504
505func (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
524func (p Port) currentSystemProcessor() string {
525 if p.DevDep || p.HostDep {

Callers 2

findMatchedConfigMethod · 0.95
matchBuildConfigMethod · 0.95

Calls 4

GetHostNameMethod · 0.65
PlatformMethod · 0.65
GetToolchainMethod · 0.65
GetSystemNameMethod · 0.65

Tested by

no test coverage detected