Skip to content

Commit

Permalink
[ASan][ROCm][Staging] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR.
Browse files Browse the repository at this point in the history
Add LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF for ASan cmake configuration
of release/debug build/install of openmp && offload components.
  • Loading branch information
ampandey-AMD committed May 3, 2024
1 parent 4922ca5 commit 4635205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/build_offload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---- "
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions bin/build_openmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---- "
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 4635205

Please sign in to comment.