You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Ninja object paths collide for same-basename sources with different extensions #149
The Ninja backend derives object paths by replacing each source suffix with .o. Within one target, source files that share a basename but use different extensions therefore map to the same output.
For example, src/start.c and src/start.S both generate _build/obj/app/src/start.o. Ninja rejects the generated manifest because multiple build rules declare the same output, so valid mixed C and assembly targets cannot build.
Expected behavior
Object paths should retain enough of the complete source filename to remain unique while preserving target namespacing:
src/start.c → _build/obj/app/src/start.c.o
src/start.S → _build/obj/app/src/start.S.o
The compilation database should use the same object paths as the Ninja manifest.
Reproduction steps
Define one executable target containing src/start.c and src/start.S.
Generate the Ninja build manifest.
Inspect the object outputs or run ninja -n.
Observe that both compile rules declare _build/obj/app/src/start.o, causing Ninja to reject the manifest with a duplicate-output error.
Version or commit
Upstream master before PR #133; reproduced at the parent of commit 5cc570d
Environment
Platform-independent Ninja manifest generation. Reproduced in the Python Ninja backend tests on Windows; the generated manifest was also checked with a real Ninja dry run.
Logs or diagnostics
Submission checks
I searched existing issues for a duplicate.
This report contains no security-sensitive details.
Hi, I came across this issue while exploring ebuild and would like to contribute. I’ll take a look at the linked PR and the related tests to understand the fix and see if there are any gaps or additional edge cases I can help with.
Activity
Greeva48 commentedon Sep 18, 2026
Hi, I came across this issue while exploring ebuild and would like to contribute. I’ll take a look at the linked PR and the related tests to understand the fix and see if there are any gaps or additional edge cases I can help with.