From 951f01709bf1f5c0997255beaf68eb073ccdda7e Mon Sep 17 00:00:00 2001 From: Tamas Nepusz Date: Mon, 1 Jul 2024 18:21:15 +0200 Subject: [PATCH] fix: make sure to compile igrpah with LTO when available --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 11d4cd967..1610a5f1d 100644 --- a/setup.py +++ b/setup.py @@ -283,6 +283,9 @@ def _compile_in( for deps in "ARPACK BLAS GLPK GMP LAPACK".split(): args.append("-DIGRAPH_USE_INTERNAL_" + deps + "=ON") + # Use link-time optinization if available + args.append("-DIGRAPH_ENABLE_LTO=AUTO") + # -fPIC is needed on Linux so we can link to a static igraph lib from a # Python shared library args.append("-DCMAKE_POSITION_INDEPENDENT_CODE=ON")