Index: Makefile =================================================================== --- Makefile +++ Makefile @@ -47,3 +47,20 @@ @echo mode=$(mode) @echo jobs=$(jobs) +include $(omp_root)$(SLASH)..$(SLASH)testsuite/Makefile + +libiomp5_path=$(shell $(omp_root)/tools/check-openmp.pl) +test_path=$(shell $(omp_root)/tools/check-openmp-test.pl) + +check-openmp: info mkdir + @$(Verb) if which llvm-lit &> /dev/null; then \ + if [ -d "$(omp_root)$(SLASH)..$(SLASH)testsuite$(SLASH)LLVM-IR" ] ; then \ + TESTSUITE_TEMP=$(realpath $(omp_root))$(SLASH)tmp \ + LIBRARY_PATH=$(libiomp5_path):$(LIBRARY_PATH) \ + LD_LIBRARY_PATH=$(libiomp5_path):$(LD_LIBRARY_PATH) \ + DYLD_LIBRARY_PATH=$(libiomp5_path):$(DYLD_LIBRARY_PATH) \ + llvm-lit -j 1 $(realpath $(omp_root))$(SLASH)..$(SLASH)testsuite$(SLASH)LLVM-IR$(SLASH)$(test_path) -v ; \ + else \ + echo "No test directory" ; exit 1; \ + fi; else echo "No llvm-lit in $(PATH)"; exit 1; fi + Index: tools/check-openmp-test.pl =================================================================== --- tools/check-openmp-test.pl +++ tools/check-openmp-test.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/lib"; + +# LIBOMP modules. +use Build; +use LibOMP; +use Platform ":vars"; +use Uname; +use tools; + +my $root_dir = $ENV{ LIBOMP_WORK }; +print join('', $target_os, "_", $target_arch, "/"); + Index: tools/check-openmp.pl =================================================================== --- tools/check-openmp.pl +++ tools/check-openmp.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/lib"; + +# LIBOMP modules. +use Build; +use LibOMP; +use Platform ":vars"; +use Uname; +use tools; + +my $root_dir = $ENV{ LIBOMP_WORK }; +print join('', $root_dir, "/", "exports", "/", $target_os, "_", $target_arch, "/", "lib"); +