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")