Commit 7a3da12e authored by Herwig Hochleitner's avatar Herwig Hochleitner
Browse files

curv: add gcc wrapper for -Ojit

parent 9da49e68
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -8,8 +8,10 @@
  boost,
  eigen_3_4_0,
  glm,
  gcc,
  libGL,
  libpng,
  makeWrapper,
  openexr,
  onetbb,
  xorg,
@@ -36,6 +38,7 @@ stdenv.mkDerivation {
    cmake
    git
    pkg-config
    makeWrapper
  ];

  buildInputs = [
@@ -75,6 +78,18 @@ stdenv.mkDerivation {
      --replace-fail "cmake_minimum_required(VERSION 2.6.2)" "cmake_minimum_required(VERSION 3.10)"
  '';

  ## support runtime compilation with -Ojit
  fixupPhase = ''
    wrapProgram $out/bin/curv \
      --set NIX_CFLAGS_COMPILE_${gcc.suffixSalt} "$NIX_CFLAGS_COMPILE" \
      --set NIX_LDFLAGS_${gcc.suffixSalt} "$NIX_LDFLAGS" \
      --prefix PATH : "${
        lib.makeBinPath [
          gcc
        ]
      }"
  '';

  passthru.updateScript = unstableGitUpdater { };

  meta = {