Skip to content

-mbig-obj is incompatible with -flto on mingw compiler and cause problems linking the library in a project #2726

Description

@VasiliPupkin256

I think this is a bug in mingw compiler, but this library adds the switch to its interface

fmt/CMakeLists.txt

Lines 251 to 256 in c5aafd8

if (MINGW)
check_cxx_compiler_flag("-Wa,-mbig-obj" FMT_HAS_MBIG_OBJ)
if (${FMT_HAS_MBIG_OBJ})
target_compile_options(fmt PUBLIC "-Wa,-mbig-obj")
endif()
endif ()
and this trigger errors "plugin needed to handle lto object"

My system is Ubuntu 20.04 and I am compiling with 86_64-w64-mingw32

May be the requirement can be relaxed for 64 bit projects? What was the reason to include the flag into the config?

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