From 463520591cc7f839df28a80e764e4cdee0f084f4 Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Fri, 3 May 2024 11:11:14 +0530 Subject: [PATCH] [ASan][ROCm][Staging] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR. Add LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF for ASan cmake configuration of release/debug build/install of openmp && offload components. --- bin/build_offload.sh | 4 ++-- bin/build_openmp.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build_offload.sh b/bin/build_offload.sh index 5776f56a50..771512c8aa 100755 --- a/bin/build_offload.sh +++ b/bin/build_offload.sh @@ -161,7 +161,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then fi if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then - ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DSANITIZER_AMDGPU=1 -DOFFLOAD_LIBDIR_SUFFIX=/asan" + ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DSANITIZER_AMDGPU=1 -DOFFLOAD_LIBDIR_SUFFIX=/asan" mkdir -p $BUILD_DIR/build/offload/asan cd $BUILD_DIR/build/offload/asan echo " ------Running offload-asan cmake ---- " @@ -195,7 +195,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then # Only use CMAKE_CXX/C_FLAGS on non-asan builds as these will overwrite the asan flags if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then - ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DSANITIZER_AMDGPU=1 -DOFFLOAD_LIBDIR_SUFFIX=-debug/asan" + ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DSANITIZER_AMDGPU=1 -DOFFLOAD_LIBDIR_SUFFIX=-debug/asan" fi MYCMAKEOPTS="$MYCMAKEOPTS -DOFFLOAD_LIBDIR_SUFFIX=-debug" diff --git a/bin/build_openmp.sh b/bin/build_openmp.sh index 712cab6511..908680f224 100755 --- a/bin/build_openmp.sh +++ b/bin/build_openmp.sh @@ -161,7 +161,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then fi if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then - ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DSANITIZER_AMDGPU=1 -DLLVM_LIBDIR_SUFFIX=/asan" + ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DSANITIZER_AMDGPU=1 -DLLVM_LIBDIR_SUFFIX=/asan" mkdir -p $BUILD_DIR/build/openmp/asan cd $BUILD_DIR/build/openmp/asan echo " ------Running openmp-asan cmake ---- " @@ -195,7 +195,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then # Only use CMAKE_CXX/C_FLAGS on non-asan builds as these will overwrite the asan flags if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then - ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DSANITIZER_AMDGPU=1 -DLLVM_LIBDIR_SUFFIX=-debug/asan" + ASAN_CMAKE_OPTS="$MYCMAKEOPTS -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DSANITIZER_AMDGPU=1 -DLLVM_LIBDIR_SUFFIX=-debug/asan" fi MYCMAKEOPTS="$MYCMAKEOPTS -DLLVM_LIBDIR_SUFFIX=-debug"