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

Function _bootstrap_darwin

misc/python/materialize/xcompile.py:216–241  ·  view source on GitHub ↗
(arch: Arch)

Source from the content-addressed store, hash-verified

214
215
216def _bootstrap_darwin(arch: Arch) -> None:
217 # Building in Docker for Mac is painfully slow, so we install a
218 # cross-compiling toolchain on the host and use that instead.
219
220 BOOTSTRAP_VERSION = "7"
221 BOOTSTRAP_FILE = MZ_ROOT / "target-xcompile" / target(arch) / ".xcompile-bootstrap"
222 try:
223 contents = BOOTSTRAP_FILE.read_text()
224 except FileNotFoundError:
225 contents = ""
226 if contents == BOOTSTRAP_VERSION:
227 return
228
229 spawn.runv(
230 [
231 "brew",
232 "install",
233 "lld",
234 f"materializeinc/crosstools/{target(arch)}",
235 f"materializeinc/crosstools/libfdb-c-{target(arch)}",
236 ]
237 )
238 spawn.runv(["rustup", "target", "add", target(arch)])
239
240 BOOTSTRAP_FILE.parent.mkdir(parents=True, exist_ok=True)
241 BOOTSTRAP_FILE.write_text(BOOTSTRAP_VERSION)

Callers 2

cargoFunction · 0.85
toolFunction · 0.85

Calls 1

targetFunction · 0.85

Tested by

no test coverage detected