Skip to content

Fat LTO ignores user GCC flags #1020

Open

Description

@9tMoth

In my MIPS program, I have GCC flags specifically to disable $gp-relative accesses, which works fine without LTO enabled. But if I enable LTO, it starts compiling with $gp-relative accesses/relocations, which breaks the entire build at the linking stage.

After some investigation, I figured out that this piece of code may be the culprit. It seems like it creates a new gccjit context and only sets a few arguments (disregarding whatever I set in llvm_args) before it starts compiling.

https://github.com/rust-lang/rustc_codegen_gcc/blob/master/src/back/write.rs#L146

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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