From 689279a48658cb4e1cb9eb06d24e4ad34b64b545 Mon Sep 17 00:00:00 2001 From: Michael Halkenhaeuser Date: Wed, 27 May 2026 08:27:56 -0500 Subject: [PATCH 1/2] [NFC] Makefile.defs: Improve omptest search path building Use `clang -print-resource-dir` instead of manual path building - supported since at least version 18 of clang --- test/Makefile.defs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Makefile.defs b/test/Makefile.defs index 1075e2ef5..77c2030ce 100644 --- a/test/Makefile.defs +++ b/test/Makefile.defs @@ -387,8 +387,8 @@ else endif # ompTest: Set header include path + linker flag for corresponding OMPT tests -CLANG_VERSION := $(lastword $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(AOMP)/lib/clang/*/)))))) -OMPTEST = -I$(AOMP)/lib/clang/$(CLANG_VERSION)/include/omptest -lomptest +CLANG_RESOURCE_DIR ?= $(shell $(AOMP)/bin/clang -print-resource-dir) +OMPTEST ?= -I$(CLANG_RESOURCE_DIR)/include/omptest -lomptest # ompTest: Set and export CMake config path omptest_DIR = $(AOMP)/lib/cmake/openmp/omptest/ From a43184aeef4cc9c78ca991e14883bb13bd40b534 Mon Sep 17 00:00:00 2001 From: Michael Halkenhaeuser Date: Wed, 27 May 2026 08:36:19 -0500 Subject: [PATCH 2/2] fixup! [NFC] Makefile.defs: Improve omptest search path building --- test/Makefile.defs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Makefile.defs b/test/Makefile.defs index 77c2030ce..438685ac4 100644 --- a/test/Makefile.defs +++ b/test/Makefile.defs @@ -387,8 +387,8 @@ else endif # ompTest: Set header include path + linker flag for corresponding OMPT tests -CLANG_RESOURCE_DIR ?= $(shell $(AOMP)/bin/clang -print-resource-dir) -OMPTEST ?= -I$(CLANG_RESOURCE_DIR)/include/omptest -lomptest +CLANG_RESOURCE_DIR := $(shell $(AOMP)/bin/clang -print-resource-dir) +OMPTEST = -I$(CLANG_RESOURCE_DIR)/include/omptest -lomptest # ompTest: Set and export CMake config path omptest_DIR = $(AOMP)/lib/cmake/openmp/omptest/