Files
jungle/test/compilers/clang-openmp-ld.nix
Aleix Boné fed0cc9685 Remove unused sys-devices requirement in ld test
The test only checks compilation (and linkage),
without actually running the program. There
was no need to access NUMA information.

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-19 12:53:42 +01:00

43 lines
493 B
Nix

{
stdenv
, writeText
, openmp
}:
let
hello_c = writeText "hello.c" ''
int main(int argc, char *argv[])
{
#pragma omp parallel
{
}
return 0;
}
'';
in stdenv.mkDerivation {
pname = "openmp-test-ld";
version = "1.0.0";
dontUnpack = true;
dontConfigure = true;
buildInputs = [ openmp ];
buildPhase = ''
set -x
cp ${hello_c} hello.c
clang -fopenmp=libompv ./hello.c -o hello
set +x
'';
installPhase = ''
touch $out
'';
}