Skip to content

Automatic linking of extern mods is not effective #3502

Closed
@brson

Description

@brson
// This tries to link to a library called foo
extern mod foo { }

I believe that I override the automatic linkage more often than not, sometimes even inserting bogus extern mods just to have a place to stuff linker arguments

#[nolink]
#[link_args = "-lwhatever"]
extern mod foo { }

Perhaps we can remove the automatic linking behavior and replace it with a richer set of linker attributes that can be specified either on extern mods or the crate as appropriate. There are quite a lot of bindings out there now, so we can look through them for use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binaries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions