pybind / pybind11

Seamless operability between C++11 and Python

Home Page:https://pybind11.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: FLTO command line typo results in clang error

gpapan opened this issue · comments

Required prerequisites

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

2.12.0

Problem description

I think a bug/typo was introduced in L309 of https://github.com/pybind/pybind11/pull/4642/files. Instead of

HAS_FLTO_THIN "-flto${thin}${cxx_append}" "-flto=${thin}${linker_append}"

it should be

HAS_FLTO_THIN "-flto${thin}${cxx_append}" "-flto${thin}${linker_append}"

This change landed in https://github.com/pybind/pybind11/releases/tag/v2.12.0. The bug is still there in pybind11's current master: tools/pybind11Common.cmake#L328.

The issue above results in linker command containing -flto= or -flto==thin, which result in clang errors like the one below:

clang: error: unsupported argument '' to option '-flto='

Reproducible example code

See discussion above.

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

2.11.1