From ebb22e87ef5f96e6a99861470858199b0023348d Mon Sep 17 00:00:00 2001 From: Alexander Reimann Date: Mon, 9 May 2022 14:42:40 +0200 Subject: [PATCH] [cmake] Remove -ftlo flag from PY_CFLAGS Can lead to issues when linking for system libraries compiled with a different compiler version --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cec0172..1b903d64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,7 @@ if (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND AND BUILD set(PY_VARS CFLAGS LDFLAGS LINKER EXT_SUFFIX) cmake_parse_arguments(PY "" "${PY_VARS}" "" ${PY_OUT}) separate_arguments(PY_CFLAGS) + list(REMOVE_ITEM PY_CFLAGS -flto) separate_arguments(PY_LDFLAGS) foreach(X detect py_type)