Fix Makefile to work on nvidia platform
@@ -5,7 +5,13 @@ TESTSRC_MAIN = clang-274983.cpp
TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
-TARGET = -fopenmp -O3 -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=$(AOMP_GPU)
+ifeq (sm_,$(findstring sm_,$(AOMP_GPU)))
+ _gputriple = nvptx64-nvidia-cuda
+else
+ _gputriple = amdgcn-amd-amdhsa
+endif
+
+TARGET = -fopenmp -O3 -fopenmp-targets=$(_gputriple) -Xopenmp-target=$(_gputriple) -march=$(AOMP_GPU)
CLANG = clang++
OMP_BIN = $(AOMP)/bin/$(CLANG)
