Skip to content

ci: run tests on Mach-O (skip ELF tests), reorder CI jobs#1895

Merged
marxin merged 7 commits intowild-linker:mainfrom
marxin:int-tests-single-platform
May 7, 2026
Merged

ci: run tests on Mach-O (skip ELF tests), reorder CI jobs#1895
marxin merged 7 commits intowild-linker:mainfrom
marxin:int-tests-single-platform

Conversation

@marxin
Copy link
Copy Markdown
Collaborator

@marxin marxin commented May 6, 2026

With the integration_tests, the ELF tests are run (linked) even on Mach-O, but there are 2 fundamental problems with the approach:

  1. /usr/bin/ld on Mach-O is a system linker that does not support the ELF options:
❯ ld -v
@(#)PROGRAM:ld PROJECT:ld-1230.1
BUILD 06:36:05 Dec  2 2025
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em armv8m.main armv8.1m.main
will use ld-classic for: armv6 armv7 armv7s i386 armv6m armv7k armv7m armv7em
LTO support using: LLVM version 17.0.0 (static support for 29, runtime is 29)
TAPI support using: Apple TAPI version 17.0.0 (tapi-1700.3.8)
  1. The system compiler (e.g. gcc) does not produce ELF files:
            cargo run --bin wild -- -flavor gnu -static --gc-sections --wrap=foo --wrap=bar --wrap=baz -o /Users/apple/Programming/wild/wild/tests/build/elf/aarch64/wrap/default/wrap.c.wild /Users/apple/Programming/wild/wild/tests/build/elf/aarch64/wrap/default/wrap.c.o /Users/apple/Programming/wild/wild/tests/build/elf/aarch64/wrap/default/runtime.c.o /Users/apple/Programming/wild/wild/tests/build/elf/aarch64/wrap/default/wrap-1.c.o /Users/apple/Programming/wild/wild/tests/build/elf/aarch64/wrap/default/wrap-2.c.o --validate-output --write-layout --write-trace --dependency-file=/Users/apple/Programming/wild/wild/tests/build/elf/aarch64/wrap/default/wrap.c.wild.deps
        Failed to parse object file `/Users/apple/Programming/wild/wild/tests/build/elf/aarch64/wrap/default/wrap.c.o`
        Unsupported ELF header

That's why I tentatively suggest dropping the cross-platform capability of the integrations tests. Thoughts once that @davidlattimore?

@marxin marxin force-pushed the int-tests-single-platform branch from db1eb74 to dcb4c66 Compare May 6, 2026 20:30
@marxin marxin marked this pull request as ready for review May 6, 2026 20:31
@marxin marxin force-pushed the int-tests-single-platform branch 2 times, most recently from 2dae283 to 67cd8e7 Compare May 6, 2026 20:39
@marxin marxin force-pushed the int-tests-single-platform branch from 67cd8e7 to 9df23f8 Compare May 6, 2026 20:40
@davidlattimore
Copy link
Copy Markdown
Member

It seems reasonable to not run Linux tests on Mac, but why not continue to run Mac tests on Linux? When doing refactorings (on Linux), it's very useful to be able to at least verify that the Mac code paths in the linker still run OK.

@marxin marxin changed the title ci: support only host Platform + run tests on Mach-O ci: run tests on Mach-O (skip ELF tests), reorder CI jobs May 7, 2026
@marxin
Copy link
Copy Markdown
Collaborator Author

marxin commented May 7, 2026

Works for me! Part of the PR is also a reordering of the CI jobs so that we have them grouped by platform (Linux, wasip1, Mach-O, Windows). Hope it makes sense.

@marxin marxin requested a review from davidlattimore May 7, 2026 06:03
@marxin marxin merged commit 95259ad into wild-linker:main May 7, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants