swift
swift copied to clipboard
build: enable handling of alpine-linux-musl triple
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
.
@swift-ci please smoke test
@swift-ci please smoke test
the general fix makes sense. is a more elegant way to detect it than shelling out to clang? how does clang do it?
AFAIU, clang implements distro-specific parsing of /proc/version
and /etc/*release
files when running on Linux. Here we delegate to that logic, an alternative would be to reimplement it in our Python build scripts.
@swift-ci please smoke test
@swift-ci test
@swift-ci build toolchain