mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-26 17:59:11 +00:00
fix: LTO warning of gcc >= 11.4 (#5791)
lto-wrapper: warning: using serial compilation of n LTRANS jobs https://stackoverflow.com/questions/72218980/gcc-v12-1-warning-about-serial-compilation
This commit is contained in:
@@ -363,6 +363,11 @@ function(_pybind11_generate_lto target prefer_thin_lto)
|
|||||||
PYBIND11_LTO_CXX_FLAGS PYBIND11_LTO_LINKER_FLAGS)
|
PYBIND11_LTO_CXX_FLAGS PYBIND11_LTO_LINKER_FLAGS)
|
||||||
endif()
|
endif()
|
||||||
if(NOT HAS_FLTO_THIN)
|
if(NOT HAS_FLTO_THIN)
|
||||||
|
_pybind11_return_if_cxx_and_linker_flags_work(
|
||||||
|
HAS_FLTO_AUTO "-flto=auto${cxx_append}" "-flto=auto${linker_append}"
|
||||||
|
PYBIND11_LTO_CXX_FLAGS PYBIND11_LTO_LINKER_FLAGS)
|
||||||
|
endif()
|
||||||
|
if(NOT HAS_FLTO_AUTO)
|
||||||
_pybind11_return_if_cxx_and_linker_flags_work(
|
_pybind11_return_if_cxx_and_linker_flags_work(
|
||||||
HAS_FLTO "-flto${cxx_append}" "-flto${linker_append}" PYBIND11_LTO_CXX_FLAGS
|
HAS_FLTO "-flto${cxx_append}" "-flto${linker_append}" PYBIND11_LTO_CXX_FLAGS
|
||||||
PYBIND11_LTO_LINKER_FLAGS)
|
PYBIND11_LTO_LINKER_FLAGS)
|
||||||
|
|||||||
Reference in New Issue
Block a user