Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic support for Alpine Linux on aarch64 #62245

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Nov 24, 2022

These changes allow us to build the toolchain and Swift runtime on aarch64 Alpine Linux.

MaxDesiatov and others added 5 commits November 21, 2022 12:15
Currently, when building LLVM/clang on Alpine Linux, CMake toolchain file specifies incorrect `<cpu_arch>-unknown-linux-musl` target, which makes the build immediately fail. Correct target that allows building on Alpine should be specified as `<cpu_arch>-alpine-linux-musl`, with `<cpu_arch>` replaced with respective CPU platform, e.g. `aarch64`.
@MaxDesiatov MaxDesiatov added Linux Platform: Linux build-script Area → utils: The build script arm64 Architecture: arm64 (aarch64) — any 64-bit ARM cmake labels Nov 24, 2022
@MaxDesiatov MaxDesiatov changed the title Add support for Alpine Linux on aarch64 Add basic support for Alpine Linux on aarch64 Nov 24, 2022
@MaxDesiatov MaxDesiatov force-pushed the maxd/build-alpine-product branch 2 times, most recently from 26c62b6 to 1e37999 Compare January 11, 2023 16:26
@MaxDesiatov MaxDesiatov force-pushed the maxd/build-alpine-product branch 2 times, most recently from 5e1b11c to 5db8cee Compare January 18, 2023 14:47
@MaxDesiatov MaxDesiatov force-pushed the maxd/build-alpine-product branch 3 times, most recently from 37c40ec to 4181a4c Compare June 12, 2023 13:52
@finagolfin
Copy link
Contributor

Rather than adding a whole new Alpine SDK to the build system, would it make more sense to add the concept of a libc somehow, so the Linux SDK would then have a choice of three libcs: Glibc, Musl, and Bionic?

@MaxDesiatov MaxDesiatov force-pushed the maxd/build-alpine-product branch 2 times, most recently from 4ce56d3 to 501a5da Compare July 5, 2023 21:14
Base automatically changed from maxd/build-alpine-product to main July 18, 2023 12:05
@Gustl22
Copy link

Gustl22 commented Sep 7, 2023

@MaxDesiatov Are there plans to also support Alpine on x86, or would there be some drawbacks? Can't wait to see swift for Linux Alpine to enable formatting and linting in the CI ;D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm64 Architecture: arm64 (aarch64) — any 64-bit ARM build-script Area → utils: The build script cmake Linux Platform: Linux platform support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants