diff options
Diffstat (limited to 'openmp/runtime')
-rw-r--r-- | openmp/runtime/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | openmp/runtime/test/lit.cfg | 4 | ||||
-rw-r--r-- | openmp/runtime/test/ompt/loadtool/tool_available.c (renamed from openmp/runtime/test/ompt/loadtool/tool_available/tool_available.c) | 30 | ||||
-rw-r--r-- | openmp/runtime/test/ompt/loadtool/tool_available_search.c (renamed from openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c) | 11 | ||||
-rw-r--r-- | openmp/runtime/test/ompt/loadtool/tool_not_available.c (renamed from openmp/runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c) | 12 |
5 files changed, 32 insertions, 27 deletions
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index 698e185..569061c 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -11,7 +11,7 @@ include(ExtendPath) # The generated headers will be placed in clang's resource directory if present. -if(OPENMP_STANDALONE_BUILD OR NOT LLVM_RUNTIMES_BUILD) +if(NOT LLVM_TREE_AVAILABLE) set(LIBOMP_HEADERS_INTDIR ${CMAKE_CURRENT_BINARY_DIR}) else() set(LIBOMP_HEADERS_INTDIR ${LLVM_BINARY_DIR}/${LIBOMP_HEADERS_INSTALL_PATH}) diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg index ca32985..4a5aff2 100644 --- a/openmp/runtime/test/lit.cfg +++ b/openmp/runtime/test/lit.cfg @@ -217,11 +217,11 @@ if config.has_ompt: config.substitutions.append(("%preload-tool", "true ||")) config.substitutions.append(("%no-as-needed-flag", "-Wl,--no-as-needed")) elif config.operating_system == 'Darwin': - config.substitutions.append(("%preload-tool", "env DYLD_INSERT_LIBRARIES=%T/tool.so")) + config.substitutions.append(("%preload-tool", "env DYLD_INSERT_LIBRARIES=%t.tool_dir/tool.so")) # No such linker flag on Darwin. config.substitutions.append(("%no-as-needed-flag", "")) else: - config.substitutions.append(("%preload-tool", "env LD_PRELOAD=%T/tool.so")) + config.substitutions.append(("%preload-tool", "env LD_PRELOAD=%t.tool_dir/tool.so")) config.substitutions.append(("%no-as-needed-flag", "-Wl,--no-as-needed")) else: config.substitutions.append(("FileCheck", config.test_filecheck)) diff --git a/openmp/runtime/test/ompt/loadtool/tool_available/tool_available.c b/openmp/runtime/test/ompt/loadtool/tool_available.c index ba6ce32..a08581b 100644 --- a/openmp/runtime/test/ompt/loadtool/tool_available/tool_available.c +++ b/openmp/runtime/test/ompt/loadtool/tool_available.c @@ -1,5 +1,7 @@ // The OpenMP standard defines 3 ways of providing ompt_start_tool: +// RUN: mkdir -p %t.tool_dir + // 1. "statically-linking the tool’s definition of ompt_start_tool into an // OpenMP application" @@ -9,20 +11,20 @@ // Note: We should compile the tool without -fopenmp as other tools developer // would do. Otherwise this test may pass for the wrong reasons on Darwin. -// RUN: %clang %flags -DTOOL -shared -fPIC %s -o %T/tool.so +// RUN: %clang %flags -DTOOL -shared -fPIC %s -o %t.tool_dir/tool.so // 2. "introducing a dynamically-linked library that includes the tool’s // definition of ompt_start_tool into the application’s address space" // 2.1 Link with tool during compilation -// RUN: %libomp-compile -DCODE %no-as-needed-flag %T/tool.so && \ +// RUN: %libomp-compile -DCODE %no-as-needed-flag %t.tool_dir/tool.so && \ // RUN: env OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | FileCheck %s \ // RUN: --check-prefixes CHECK,ADDRSPACE // 2.2 Link with tool during compilation, but AFTER the runtime -// RUN: %libomp-compile -DCODE -lomp %no-as-needed-flag %T/tool.so && \ +// RUN: %libomp-compile -DCODE -lomp %no-as-needed-flag %t.tool_dir/tool.so && \ // RUN: env OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | FileCheck %s \ // RUN: --check-prefixes CHECK,ADDRSPACE @@ -39,36 +41,36 @@ // 3.1 OMP_TOOL_VERBOSE_INIT not set // RUN: %libomp-compile -DCODE && \ -// RUN: env OMP_TOOL_LIBRARIES=%T/tool.so %libomp-run | FileCheck %s +// RUN: env OMP_TOOL_LIBRARIES=%t.tool_dir/tool.so %libomp-run | FileCheck %s // 3.2 OMP_TOOL_VERBOSE_INIT disabled -// RUN: env OMP_TOOL_LIBRARIES=%T/tool.so OMP_TOOL_VERBOSE_INIT=disabled \ +// RUN: env OMP_TOOL_LIBRARIES=%t.tool_dir/tool.so OMP_TOOL_VERBOSE_INIT=disabled \ // RUN: %libomp-run | FileCheck %s // 3.3 OMP_TOOL_VERBOSE_INIT to stdout -// RUN: %libomp-compile -DCODE && env OMP_TOOL_LIBRARIES=%T/tool.so \ +// RUN: %libomp-compile -DCODE && env OMP_TOOL_LIBRARIES=%t.tool_dir/tool.so \ // RUN: OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | \ -// RUN: FileCheck %s -DPARENTPATH=%T --check-prefixes CHECK,TOOLLIB +// RUN: FileCheck %s -DPARENTPATH=%t.tool_dir --check-prefixes CHECK,TOOLLIB // 3.4 OMP_TOOL_VERBOSE_INIT to stderr, check merged stdout and stderr -// RUN: env OMP_TOOL_LIBRARIES=%T/tool.so OMP_TOOL_VERBOSE_INIT=stderr \ +// RUN: env OMP_TOOL_LIBRARIES=%t.tool_dir/tool.so OMP_TOOL_VERBOSE_INIT=stderr \ // RUN: %libomp-run 2>&1 | \ -// RUN: FileCheck %s -DPARENTPATH=%T --check-prefixes CHECK,TOOLLIB +// RUN: FileCheck %s -DPARENTPATH=%t.tool_dir --check-prefixes CHECK,TOOLLIB // 3.5 OMP_TOOL_VERBOSE_INIT to stderr, check just stderr -// RUN: env OMP_TOOL_LIBRARIES=%T/tool.so OMP_TOOL_VERBOSE_INIT=stderr \ +// RUN: env OMP_TOOL_LIBRARIES=%t.tool_dir/tool.so OMP_TOOL_VERBOSE_INIT=stderr \ // RUN: %libomp-run 2>&1 >/dev/null | \ -// RUN: FileCheck %s -DPARENTPATH=%T --check-prefixes TOOLLIB +// RUN: FileCheck %s -DPARENTPATH=%t.tool_dir --check-prefixes TOOLLIB // 3.6 OMP_TOOL_VERBOSE_INIT to file "init.log" -// RUN: env OMP_TOOL_LIBRARIES=%T/tool.so OMP_TOOL_VERBOSE_INIT=%T/init.log \ -// RUN: %libomp-run | FileCheck %s && cat %T/init.log | \ -// RUN: FileCheck %s -DPARENTPATH=%T --check-prefixes TOOLLIB +// RUN: env OMP_TOOL_LIBRARIES=%t.tool_dir/tool.so OMP_TOOL_VERBOSE_INIT=%t.tool_dir/init.log \ +// RUN: %libomp-run | FileCheck %s && cat %t.tool_dir/init.log | \ +// RUN: FileCheck %s -DPARENTPATH=%t.tool_dir --check-prefixes TOOLLIB // REQUIRES: ompt diff --git a/openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c b/openmp/runtime/test/ompt/loadtool/tool_available_search.c index cf1fd33..73e2dea 100644 --- a/openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c +++ b/openmp/runtime/test/ompt/loadtool/tool_available_search.c @@ -1,9 +1,10 @@ -// RUN: %clang %flags -shared -fPIC %s -o %T/first_tool.so -// RUN: %clang %flags -DTOOL -DSECOND_TOOL -shared -fPIC %s -o %T/second_tool.so -// RUN: %clang %flags -DTOOL -DTHIRD_TOOL -shared -fPIC %s -o %T/third_tool.so +// RUN: mkdir -p %t.tool_dir +// RUN: %clang %flags -shared -fPIC %s -o %t.tool_dir/first_tool.so +// RUN: %clang %flags -DTOOL -DSECOND_TOOL -shared -fPIC %s -o %t.tool_dir/second_tool.so +// RUN: %clang %flags -DTOOL -DTHIRD_TOOL -shared -fPIC %s -o %t.tool_dir/third_tool.so // RUN: %libomp-compile -DCODE -// RUN: env OMP_TOOL_LIBRARIES=%T/non_existing_file.so:%T/first_tool.so:%T/second_tool.so:%T/third_tool.so \ -// RUN: OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | FileCheck %s -DPARENTPATH=%T +// RUN: env OMP_TOOL_LIBRARIES=%t.tool_dir/non_existing_file.so:%t.tool_dir/first_tool.so:%t.tool_dir/second_tool.so:%t.tool_dir/third_tool.so \ +// RUN: OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | FileCheck %s -DPARENTPATH=%t.tool_dir // REQUIRES: ompt // XFAIL: darwin diff --git a/openmp/runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c b/openmp/runtime/test/ompt/loadtool/tool_not_available.c index 7e68d8b..df56d31 100644 --- a/openmp/runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c +++ b/openmp/runtime/test/ompt/loadtool/tool_not_available.c @@ -1,5 +1,7 @@ // The OpenMP standard defines 3 ways of providing ompt_start_tool: +// RUN: mkdir -p %t.tool_dir + // 1. "statically-linking the tool’s definition of ompt_start_tool into an // OpenMP application" @@ -10,20 +12,20 @@ // Note: We should compile the tool without -fopenmp as other tools developer // would do. Otherwise this test may pass for the wrong reasons on Darwin. -// RUN: %clang %flags -DTOOL -shared -fPIC %s -o %T/tool.so +// RUN: %clang %flags -DTOOL -shared -fPIC %s -o %t.tool_dir/tool.so // 2. "introducing a dynamically-linked library that includes the tool’s // definition of ompt_start_tool into the application’s address space" // 2.1 Link with tool during compilation -// RUN: %libomp-compile -DCODE %no-as-needed-flag %T/tool.so && \ +// RUN: %libomp-compile -DCODE %no-as-needed-flag %t.tool_dir/tool.so && \ // RUN: env OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | \ // RUN: FileCheck %s --check-prefixes CHECK,ADDRSPACE // 2.2 Link with tool during compilation, but AFTER the runtime -// RUN: %libomp-compile -DCODE -lomp %no-as-needed-flag %T/tool.so && \ +// RUN: %libomp-compile -DCODE -lomp %no-as-needed-flag %t.tool_dir/tool.so && \ // RUN: env OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | \ // RUN: FileCheck %s --check-prefixes CHECK,ADDRSPACE @@ -37,9 +39,9 @@ // architecture and operating system used by the application in the // tool-libraries-var ICV" -// RUN: %libomp-compile -DCODE && env OMP_TOOL_LIBRARIES=%T/tool.so \ +// RUN: %libomp-compile -DCODE && env OMP_TOOL_LIBRARIES=%t.tool_dir/tool.so \ // RUN: OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | \ -// RUN: FileCheck %s -DPARENTPATH=%T --check-prefixes CHECK,TOOLLIB +// RUN: FileCheck %s -DPARENTPATH=%t.tool_dir --check-prefixes CHECK,TOOLLIB // REQUIRES: ompt |