From 7ea2e439dded1baa11c4c12207eee8e1033ae104 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 21 Oct 2025 17:11:06 +0200 Subject: Random work --- modules/remote-sycl/.nix/adaptive-cpp.nix | 58 +++++++++++++++++++++++++++++++ modules/remote-sycl/.nix/derivation.nix | 6 ---- modules/remote-sycl/c++/rpc.hpp | 1 + 3 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 modules/remote-sycl/.nix/adaptive-cpp.nix diff --git a/modules/remote-sycl/.nix/adaptive-cpp.nix b/modules/remote-sycl/.nix/adaptive-cpp.nix new file mode 100644 index 0000000..6c70be0 --- /dev/null +++ b/modules/remote-sycl/.nix/adaptive-cpp.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, makeWrapper +, boost +, llvmPackages +, lld +}: + +let + version = "25.02.0"; +in stdenv.mkDerivation { + pname = "adaptive-cpp-kel-custom"; + inherit version; + + src = fetchFromGitHub { + owner = "AdaptiveCpp"; + repo = "AdaptiveCpp"; + tag = "v${version}"; + sha256 = "sha256-vXfw8+xn3/DYxUKp3QGdQ8sEbDwyk+8jDCyuvQOXigc="; + }; + + nativeBuildInputs = [ + cmake + makeWrapper + ]; + + buildInputs = [ + boost + llvmPackages.openmp + llvmPackages.libclang + llvmPackages.llvm + ]; + + cmakeFlags = [ + "-DCLANG_INCLUDE_PATH=${llvmPackages.libclang.dev}/include" + ]; + + postInstall = '' + if [ -d "$out/include/AdaptiveCpp" ]; then + mv $out/include/AdaptiveCpp .hidden-fake + mv .hidden-fake/* $out/include/ + rmdir .hidden-fake + fi + ''; + + postFixup = '' + wrapProgram $out/bin/syclcc-clang \ + --prefix PATH : ${lib.makeBinPath [ lld ]} \ + --add-flags "-L${llvmPackages.openmp}/lib" \ + --add-flags "-I${llvmPackages.openmp.dev}/include" \ + ''; + + postPatch = '' + patchShebangs . + ''; +} diff --git a/modules/remote-sycl/.nix/derivation.nix b/modules/remote-sycl/.nix/derivation.nix index bf40e89..45d2e8b 100644 --- a/modules/remote-sycl/.nix/derivation.nix +++ b/modules/remote-sycl/.nix/derivation.nix @@ -16,12 +16,6 @@ }: let - adaptivecpp_custom = (import ((builtins.fetchGit { - url = "git@git.keldu.de:forstio/forstio"; - ref = "dev"; - }).outPath + "/default.nix"){ - inherit stdenv; - }); in stdenv.mkDerivation { pname = "forstio-remote-sycl"; inherit version; diff --git a/modules/remote-sycl/c++/rpc.hpp b/modules/remote-sycl/c++/rpc.hpp index bdc6d6c..3756a5e 100644 --- a/modules/remote-sycl/c++/rpc.hpp +++ b/modules/remote-sycl/c++/rpc.hpp @@ -234,6 +234,7 @@ public: // storage_.maps auto eov = data_server_->template find(input.get_id()); if(eov.is_error()){ +#include return std::move(eov.get_error()); } return eov.get_value(); -- cgit v1.2.3