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

Function target_features

misc/python/materialize/xcompile.py:71–85  ·  view source on GitHub ↗

Returns a list of CPU features we should enable for Rust compilation. Note: We also specify the CPU target when compiling Rust which should enable the majority of available CPU features. Sync: This list of features should be kept in sync with the one in ci-builder and .cargo/confi

(arch: Arch)

Source from the content-addressed store, hash-verified

69
70
71def target_features(arch: Arch) -> list[str]:
72 """
73 Returns a list of CPU features we should enable for Rust compilation.
74
75 Note: We also specify the CPU target when compiling Rust which should enable the majority of
76 available CPU features.
77
78 Sync: This list of features should be kept in sync with the one in ci-builder and .cargo/config.
79 """
80 if arch == Arch.X86_64:
81 return ["+aes", "+pclmulqdq"]
82 elif arch == Arch.AARCH64:
83 return ["+aes", "+sha2"]
84 else:
85 raise RuntimeError("unreachable")
86
87
88def cargo(

Callers 1

cargoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected