Skip to content

use linker optimizations #6190

Closed
Closed
@thestinger

Description

@thestinger

Among other possibilities, GNU's ld (ld.bfd) and ld.gold have an -O switch to perform various optimizations. It makes them spend more time optimizing lookup table performance/size. Rust has long mangled symbol names so these optimizations are going to be important once there are large projects with lots of symbols. We probably also want to use --as-needed and perhaps --gc-sections.

Sadly Apple's ld is pretty crippled and lacks the -O switch, and I'm unsure about how portable these flags are overall. Although this issue would be bypassed by eventually using LLVM's lld linker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesI-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions