Unverified Commit 876b1d46 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #210903 from yu-re-ka/mimalloc-static

mimalloc: fix static build
parents afd8814a 521d08dd
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-0gX0rEOWT6Lp5AyRyrK5GPTBvAqc5SxSaNJOc5GIgKc=";
  };

  doCheck = true;
  doCheck = !stdenv.hostPlatform.isStatic;
  preCheck = let
    ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
  in ''
@@ -24,7 +24,11 @@ stdenv.mkDerivation rec {
  '';

  nativeBuildInputs = [ cmake ninja ];
  cmakeFlags = [ "-DMI_INSTALL_TOPLEVEL=ON" ] ++ lib.optionals secureBuild [ "-DMI_SECURE=ON" ];
  cmakeFlags = [ "-DMI_INSTALL_TOPLEVEL=ON" ]
    ++ lib.optionals secureBuild [ "-DMI_SECURE=ON" ]
    ++ lib.optionals stdenv.hostPlatform.isStatic [ "-DMI_BUILD_SHARED=OFF" ]
    ++ lib.optionals (!doCheck) [ "-DMI_BUILD_TESTS=OFF" ]
  ;

  postInstall = let
    rel = lib.versions.majorMinor version;