Skip to content

Add name mangling to dune binaries #2292

@rgrinberg

Description

@rgrinberg

Any of the executable's compilation units might conflict with some compilation unit from a transitive dependency. This can cause unpredictable failures when some library used by the executable introduces a new dependency with the same name as one of the executable's modules.

This is quite easily fixed by applying a name mangling scheme to the executable's modules. The only downsides of doing this change is that it will make using gdb slightly harder.

This mode will become the default for 2.0

@diml how should we calculate the name mangling prefix? I think that just using the executable's name is suboptimal as it might be a common name. Should we calculate some digest perhaps?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions