Skip to content

bpf-linker is not compatbile with -fuse-ld #194

Description

@addisoncrump

I encountered this while trying to run aya-rs/aya#916 locally.

warning: integration-test@0.1.0:   = note: ... "-fuse-ld=mold"
warning: integration-test@0.1.0:   = note: error: unexpected argument '-f' found
warning: integration-test@0.1.0:           
warning: integration-test@0.1.0:             tip: to pass '-f' as a value, use '-- -f'
warning: integration-test@0.1.0:           
warning: integration-test@0.1.0:           Usage: bpf-linker [OPTIONS] --output <OUTPUT> [INPUTS]...
warning: integration-test@0.1.0:           
warning: integration-test@0.1.0:           For more information, try '--help'.

This is because I use the mold linker locally in my cargo.toml:

[target.x86_64-unknown-linux-gnu]
rustflags = [
    "-C", "link-arg=-fuse-ld=mold",
]

Confusingly, I only have this set for when the target is x86_64. Is this another bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions