forked from rarias/jungle
Working stdenv with clang+ompss2
This commit is contained in:
20
test/compilers/clang-ompss2.nix
Normal file
20
test/compilers/clang-ompss2.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{stdenv, clang-ompss2, nanos6}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.0.1";
|
||||
name = "test-clang-ompss2";
|
||||
src = ./.;
|
||||
buildInputs = [ clang-ompss2 nanos6 ];
|
||||
|
||||
buildPhase = ''
|
||||
export NIX_DEBUG=6
|
||||
clang -fompss-2 hello.c -o hello
|
||||
./hello
|
||||
clang -fompss-2 hello.cc -o hello
|
||||
./hello
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
'';
|
||||
}
|
||||
7
test/compilers/hello.c
Normal file
7
test/compilers/hello.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("Hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
7
test/compilers/hello.cc
Normal file
7
test/compilers/hello.cc
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("Hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user