Skip to content

🐛 Give each test its own LTO object for dsymutil - #59

Merged
kammce merged 1 commit into
mainfrom
dsym-per-target-lto-object
Oct 11, 2026
Merged

kammce merged 1 commit into
mainfrom
dsym-per-target-lto-object

Conversation

@kammce

@kammce kammce commented Oct 11, 2026

Copy link
Copy Markdown
Member

With Apple's ld (llvm-toolchain#52), -object_path_lto,./ makes every link write the same ./lto.o. Test executables link in parallel, so dsymutil reads another test's object and prints hundreds of could not find symbol ... in object file .//lto.o warnings, leaving incomplete dSYMs.

When generating dSYMs, each test now links with -object_path_lto,CMakeFiles/<test>.dir/lto.o.

Tested: libhal/v5 with hal/tc/llvm-23 on macOS 27. 309 warnings went to 0, and all tests pass. test_serial.dSYM now contains debug info for serial_write_test.

Apple's ld writes a fixed lto.o into the shared -object_path_lto
directory, so parallel test links overwrite each other's object and
dsymutil warns "could not find symbol". Point each test at its own
object under CMakeFiles/<test>.dir/.
@kammce
kammce merged commit 8008f6f into main Oct 11, 2026
1 check passed
@kammce
kammce deleted the dsym-per-target-lto-object branch October 11, 2026 16:10
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.

1 participant