Skip to content

[BUG]: Invalid flag unnecessarily forces FLTO test to fail with gcc on macOS #6060

@barracuda156

Description

@barracuda156

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

3.0.3

Problem description

-fno-fat-lto-objects may not to be supported by gcc on macOS, and FLTO test fails, unnecessarily so, since gcc does support -flto and flto=auto. The problem originates from

elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT MINGW)
set(cxx_append ";-fno-fat-lto-objects")

Reproducible example code


Is this a regression? Put the last known working version here if it is.

Not a regression

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew bug, unverified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions