Skip to content

Compiler command line customization in the Rust makefile #29554

@brson

Description

@brson

Distros often have a standard, custom, set of flags that should be passed to all compiler invocations when building the binaries distributed as packages for that platform (think things like hardening options). For example, Debian wants to pass -Wl,-z,relro during the link step.

To support this, every compiler invocation in the makefile needs to include the appropriate CFLAGS, CXXFLAGS, LDFLAGS, or RUSTFLAGS variable. See the [Debian patch for guidance][debian-make].

re https://internals.rust-lang.org/t/perfecting-rust-packaging-the-plan/2767

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