Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CHECK_CFG_EXTRA: &[(&str, &[&str])] = &[
];

/// Musl architectures that set `#define _REDIR_TIME64 1`.
const MUSL_REDIR_TIME64_ARCHES: &[&str] = &["arm", "mips", "powerpc", "x86"];
const MUSL_REDIR_TIME64_ARCHES: &[&str] = &["arm", "hexagon", "mips", "powerpc", "x86"];

fn main() {
// Avoid unnecessary re-building.
Expand Down Expand Up @@ -110,8 +110,8 @@ fn main() {
// OpenHarmony uses a fork of the musl libc
let musl = target_env == "musl" || target_env == "ohos";

// loongarch64 and ohos only exist with recent musl
if target_arch == "loongarch64" || target_env == "ohos" {
// loongarch64, hexagon, and ohos only exist with recent musl
if target_arch == "loongarch64" || target_arch == "hexagon" || target_env == "ohos" {
musl_v1_2_3 = true;
}

Expand Down
5 changes: 3 additions & 2 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3685,6 +3685,7 @@ fn test_linux(target: &str) {
let gnueabihf = target.contains("gnueabihf");
let x86_64_gnux32 = target.contains("gnux32") && x86_64;
let riscv64 = target.contains("riscv64");
let hexagon = target.contains("hexagon");
let loongarch64 = target.contains("loongarch64");
let wasm32 = target.contains("wasm32");
let uclibc = target.contains("uclibc");
Expand All @@ -3699,9 +3700,9 @@ fn test_linux(target: &str) {
let old_musl = musl && !musl_v1_2_3;

let mut cfg = ctest_cfg();
if (musl_v1_2_3 || loongarch64) && musl {
if (musl_v1_2_3 || loongarch64 || hexagon) && musl {
cfg.cfg("musl_v1_2_3", None);
if arm || ppc32 || x86_32 || mips32 {
if arm || hexagon || ppc32 || x86_32 || mips32 {
cfg.cfg("musl32_time64", None);
cfg.cfg("linux_time_bits64", None);
}
Expand Down