Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions bin/aomp_common_vars
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#
# The bash syntax ENVNAME=${ENVNAME:-value} checks if ENVNAME is
# already set. If not, it assigns it the value following the :-
#
# Most variables defined here are consumed by the sourcing scripts,
# so their uses are invisible to static analysis.
# shellcheck disable=SC2034

# --- Start standard header to set AOMP environment variables ----
realpath=$(realpath "$0")
Expand Down Expand Up @@ -262,9 +266,11 @@ function cmquot() {
# copy & pasted into the user's terminal. Output should not be further quoted.
function shquot() {
local -a output
local arg Escaped
output=()
for arg in "$@"; do
output+=(\'${arg//\'/\'\\\'\'}\')
Escaped=${arg//\'/\'\\\'\'}
output+=("'${Escaped}'")
done
printf '%s' "${output[*]}"
}
Expand Down Expand Up @@ -568,11 +574,11 @@ declare -a ASAN_FLAGS

if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
if [ -f "${LLVM_INSTALL_LOC}/bin/clang" ]; then
ASAN_LIB=$(${LLVM_INSTALL_LOC}/bin/clang --print-file-name=libclang_rt.asan-x86_64.so)
ASAN_LIB=$("${LLVM_INSTALL_LOC}"/bin/clang --print-file-name=libclang_rt.asan-x86_64.so)
ASAN_LIB_PATH=$(dirname "$ASAN_LIB")
if [ ! -d "$ASAN_LIB_PATH" ]; then
#Suppose above search path fails then via 'LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON' the host asan library would lose the suffix
ASAN_LIB=$(${LLVM_INSTALL_LOC}/bin/clang --print-file-name=libclang_rt.asan.so)
ASAN_LIB=$("${LLVM_INSTALL_LOC}"/bin/clang --print-file-name=libclang_rt.asan.so)
ASAN_LIB_PATH=$(dirname "$ASAN_LIB")
fi
else
Expand Down
Loading