Skip to content

Add ldflags option #11

@averms

Description

@averms

Some options, like -flto and -fPIE require that the same or a similar option be passed to
the linker. See the GCC documentation for -pie:

Produce a dynamically linked position independent executable on targets that support it. For predictable results, you must also specify the same set of options used for compilation (-fpie, -fPIE, or model suboptions) when you specify this linker option.

And the documentation for -flto:

To use the link-time optimizer, -flto and optimization options should be specified at compile time and during the final link. It is recommended that you compile all the files participating in the same link with the same options and also specify those options at link time.

It would be helpful to have a --ldflags option that gets passed to all the
linking commands.

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