Commit d273f17a authored by qbisi's avatar qbisi Committed by Masum Reza
Browse files

pocl: setting KERNELLIB_HOST_CPU_VARIANTS=distro on x86_64 only

parent 728eb4ad
Loading
Loading
Loading
Loading
+19 −12
Original line number Diff line number Diff line
@@ -57,8 +57,8 @@ stdenv.mkDerivation (finalAttrs: {
      "static_cast<size_t>(Dev.getInfo<CL_DEVICE_GLOBAL_MEM_SIZE>())"
  '';

  cmakeFlags = [
    "-DKERNELLIB_HOST_CPU_VARIANTS=distro"
  cmakeFlags =
    [
      # avoid the runtime linker pulling in a different llvm e.g. from graphics drivers
      "-DSTATIC_LLVM=ON"
      "-DENABLE_POCL_BUILDING=OFF"
@@ -68,6 +68,13 @@ stdenv.mkDerivation (finalAttrs: {
      "-DCLANGXX=${clangWrapped}/bin/clang++"
      "-DENABLE_REMOTE_CLIENT=ON"
      "-DENABLE_REMOTE_SERVER=ON"
    ]
    # Only x86_64 supports "distro" which allows runtime detection of SSE/AVX
    ++ lib.optionals stdenv.hostPlatform.isx86_64 [
      "-DKERNELLIB_HOST_CPU_VARIANTS=distro"
    ]
    ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [
      "-DLLC_HOST_CPU=generic"
    ];

  nativeBuildInputs = [