OMP_HOST=1 environment variable allows for host compile/run
@@ -38,8 +38,10 @@ else
endif
ifeq ($(TARGET),)
+ ifeq ($(OMP_HOST),)
TARGET = -fopenmp-targets=$(AOMP_GPUTARGET) -Xopenmp-target=$(AOMP_GPUTARGET) -march=$(AOMP_GPU)
endif
+endif
# OFFLOAD_DEBUG is used by this test harnass to turn on HOST and/or DEVICE level debug
ifeq ($(OFFLOAD_DEBUG),1)
@@ -69,7 +71,11 @@ ifeq ($(OFFLOAD_DEBUG),5)
endif
ifeq ($(OMP_FLAGS),)
+ ifeq ($(OMP_HOST),)
OMP_FLAGS = -target $(AOMP_CPUTARGET) -fopenmp $(TARGET)
+ else
+ OMP_FLAGS = -target $(AOMP_CPUTARGET) -fopenmp
+ endif
endif
OMP_FLAGS += $(EXTRA_OMP_FLAGS)
