Commit 04168995 authored by Martin Joerg's avatar Martin Joerg
Browse files

python3Packages.graph-tool: enable GCC's link-time optimizer

parent b8881166
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -59,11 +59,18 @@ buildPythonPackage rec {
        --replace-fail 'tput sgr0' :
    '';

  configureFlags = lib.mapAttrsToList (lib.withFeatureAs true) {
  configureFlags =
    lib.mapAttrsToList (lib.withFeatureAs true) {
      boost-libdir = "${lib.getLib boost'}/lib";
      cgal = lib.getDev cgal;
      python-module-path = "$(out)/${python.sitePackages}";
  };
    }
    ++
      lib.optionals stdenv.cc.isGNU
        # enable GCC's link-time optimizer in order to reduce compilation time and memory usage during compilation
        # https://graph-tool.skewed.de/installation.html#memory-requirements-for-compilation
        # https://git.skewed.de/count0/graph-tool/-/issues/798#note_5626
        [ "MOD_CXXFLAGS=-flto" ];

  enableParallelBuilding = true;