Skip to content

Two source files with same name, different extension generate same object file name #1294

Closed
@Noxime

Description

@Noxime

Hi,

When building a project that has 2 sibling files with same name but different extension, they both result in the same filename for the object file. In my case:

...
.file("rv003usb.c")
.file("rv003usb.S")

produces two rv003usb.o files, with the latter overwriting the former. Thus, the resulting build either fails or is missing some symbols. I traced this to this line:

let obj = dst
.join(format!("{:016x}-{}", hasher.finish(), basename))
.with_extension("o");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions