(client, image, host_platform: str, target_triple: str, build_options)
| 328 | |
| 329 | |
| 330 | def 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 | |
| 360 | def build_libedit( |
no test coverage detected