Skip to content

Commit f7b5ac1

Browse files
committed
Add to validation
1 parent b49bb50 commit f7b5ac1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/validation.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const RECOGNIZED_TRIPLES: &[&str] = &[
3535
"aarch64-apple-ios",
3636
"aarch64-pc-windows-msvc",
3737
"aarch64-unknown-linux-gnu",
38+
"aarch64-unknown-linux-musl",
3839
"armv7-unknown-linux-gnueabi",
3940
"armv7-unknown-linux-gnueabihf",
4041
"arm64-apple-tvos",
@@ -157,6 +158,10 @@ static GLIBC_MAX_VERSION_BY_TRIPLE: Lazy<HashMap<&'static str, version_compare::
157158
"aarch64-unknown-linux-gnu",
158159
version_compare::Version::from("2.17").unwrap(),
159160
);
161+
versions.insert(
162+
"aarch64-unknown-linux-musl",
163+
version_compare::Version::from("1").unwrap(),
164+
);
160165
versions.insert(
161166
"armv7-unknown-linux-gnueabi",
162167
version_compare::Version::from("2.17").unwrap(),
@@ -549,6 +554,7 @@ static PLATFORM_TAG_BY_TRIPLE: Lazy<HashMap<&'static str, &'static str>> = Lazy:
549554
("aarch64-apple-ios", "iOS-aarch64"),
550555
("aarch64-pc-windows-msvc", "win-arm64"),
551556
("aarch64-unknown-linux-gnu", "linux-aarch64"),
557+
("aarch64-unknown-linux-musl", "linux-aarch64"),
552558
("armv7-unknown-linux-gnueabi", "linux-arm"),
553559
("armv7-unknown-linux-gnueabihf", "linux-arm"),
554560
("i686-pc-windows-msvc", "win32"),
@@ -949,6 +955,7 @@ fn validate_elf<Elf: FileHeader<Endian = Endianness>>(
949955

950956
let wanted_cpu_type = match target_triple {
951957
"aarch64-unknown-linux-gnu" => object::elf::EM_AARCH64,
958+
"aarch64-unknown-linux-musl" => object::elf::EM_AARCH64,
952959
"armv7-unknown-linux-gnueabi" => object::elf::EM_ARM,
953960
"armv7-unknown-linux-gnueabihf" => object::elf::EM_ARM,
954961
"i686-unknown-linux-gnu" => object::elf::EM_386,

0 commit comments

Comments
 (0)