Index: buildllvm.sh =================================================================== --- buildllvm.sh +++ buildllvm.sh @@ -1453,7 +1453,8 @@ extra_cmake_env=( "env" ) if [[ "${CCOMPILER}" =~ "xlclang" ]]; then extra_cmake_env+=( "LDFLAGS=-qpath=l:${SCRIPT_DIR}/aix-ld-default-libpath/" ) - else + fi + if [[ "${LLVM_BUILD_TYPE}" != "Debug" ]]; then extra_cmake_env+=( "LDFLAGS=-B${SCRIPT_DIR}/aix-ld-default-libpath/" ) fi fi