MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / target_cpu

Function target_cpu

misc/python/materialize/xcompile.py:57–68  ·  view source on GitHub ↗

Return the CPU micro architecture, assuming a Linux target, we should use for Rust compilation. Sync: This target-cpu should be kept in sync with the one in ci-builder and .cargo/config.

(arch: Arch)

Source from the content-addressed store, hash-verified

55
56
57def target_cpu(arch: Arch) -> str:
58 """
59 Return the CPU micro architecture, assuming a Linux target, we should use for Rust compilation.
60
61 Sync: This target-cpu should be kept in sync with the one in ci-builder and .cargo/config.
62 """
63 if arch == Arch.X86_64:
64 return "x86-64-v3"
65 elif arch == Arch.AARCH64:
66 return "neoverse-n1"
67 else:
68 raise RuntimeError("unreachable")
69
70
71def target_features(arch: Arch) -> list[str]:

Callers 1

cargoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected