Skip to content

Commit

Permalink
test: Add thumb-linux-(musl)eabi(hf) target triples for module tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Nov 3, 2024
1 parent 2caf1c0 commit 82b2c95
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions test/tests.zig
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,70 @@ const test_targets = blk: {
.link_libc = true,
},

.{
.target = .{
.cpu_arch = .thumb,
.os_tag = .linux,
.abi = .eabi,
},
},
.{
.target = .{
.cpu_arch = .thumb,
.os_tag = .linux,
.abi = .eabihf,
},
},
.{
.target = .{
.cpu_arch = .thumb,
.os_tag = .linux,
.abi = .musleabi,
},
.link_libc = true,
.skip_modules = &.{"std"},
},
.{
.target = .{
.cpu_arch = .thumb,
.os_tag = .linux,
.abi = .musleabihf,
},
.link_libc = true,
.skip_modules = &.{"std"},
},
// Calls are normally lowered to branch instructions that only support +/- 16 MB range when
// targeting Thumb. This is not sufficient for the std test binary linked statically with
// musl, so use long calls to avoid out-of-range relocations.
.{
.target = std.Target.Query.parse(.{
.arch_os_abi = "thumb-linux-musleabi",
.cpu_features = "baseline+long_calls",
}) catch @panic("OOM"),
.link_libc = true,
.pic = false, // Long calls don't work with PIC.
.skip_modules = &.{
"behavior",
"c-import",
"compiler-rt",
"universal-libc",
},
},
.{
.target = std.Target.Query.parse(.{
.arch_os_abi = "thumb-linux-musleabihf",
.cpu_features = "baseline+long_calls",
}) catch @panic("OOM"),
.link_libc = true,
.pic = false, // Long calls don't work with PIC.
.skip_modules = &.{
"behavior",
"c-import",
"compiler-rt",
"universal-libc",
},
},

.{
.target = .{
.cpu_arch = .mips,
Expand Down

0 comments on commit 82b2c95

Please sign in to comment.