MCPcopy
hub / github.com/astral-sh/python-build-standalone / build_musl

Function build_musl

cpython-unix/build.py:330–357  ·  view source on GitHub ↗
(client, image, host_platform: str, target_triple: str, build_options)

Source from the content-addressed store, hash-verified

328
329
330def build_musl(client, image, host_platform: str, target_triple: str, build_options):
331 static = "static" in build_options
332 musl = "musl-static" if static else "musl"
333 musl_archive = download_entry(musl, DOWNLOADS_PATH)
334
335 with build_environment(client, image) as build_env:
336 build_env.install_toolchain(
337 BUILD,
338 host_platform,
339 target_triple,
340 binutils=True,
341 clang=True,
342 static=False,
343 )
344 build_env.copy_file(musl_archive)
345 build_env.copy_file(SUPPORT / "build-musl.sh")
346
347 env = {
348 "MUSL_VERSION": DOWNLOADS[musl]["version"],
349 "TOOLCHAIN": "llvm",
350 }
351
352 if static:
353 env["STATIC"] = 1
354
355 build_env.run("build-musl.sh", environment=env)
356
357 build_env.get_tools_archive(toolchain_archive_path(musl, host_platform), "host")
358
359
360def build_libedit(

Callers 1

mainFunction · 0.85

Calls 7

download_entryFunction · 0.90
build_environmentFunction · 0.90
toolchain_archive_pathFunction · 0.85
install_toolchainMethod · 0.45
copy_fileMethod · 0.45
runMethod · 0.45
get_tools_archiveMethod · 0.45

Tested by

no test coverage detected