File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,16 @@ function(_pybind11_generate_lto target prefer_thin_lto)
311311 HAS_FLTO "-flto${cxx_append} " "-flto${linker_append} " PYBIND11_LTO_CXX_FLAGS
312312 PYBIND11_LTO_LINKER_FLAGS)
313313 endif ()
314+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" )
315+ # IntelLLVM equivalent to LTO is called IPO; also IntelLLVM is WIN32/UNIX
316+ # WARNING/HELP WANTED: This block of code is currently not covered by pybind11 GitHub Actions!
317+ if (WIN32 )
318+ _pybind11_return_if_cxx_and_linker_flags_work(
319+ HAS_INTEL_IPO "-Qipo" "-Qipo" PYBIND11_LTO_CXX_FLAGS PYBIND11_LTO_LINKER_FLAGS)
320+ else ()
321+ _pybind11_return_if_cxx_and_linker_flags_work(
322+ HAS_INTEL_IPO "-ipo" "-ipo" PYBIND11_LTO_CXX_FLAGS PYBIND11_LTO_LINKER_FLAGS)
323+ endif ()
314324 elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
315325 # Intel equivalent to LTO is called IPO
316326 _pybind11_return_if_cxx_and_linker_flags_work(HAS_INTEL_IPO "-ipo" "-ipo"
You can’t perform that action at this time.
0 commit comments