Skip to content

Commit a280182

Browse files
committed
Improve the detection of ASAN in build-script
The lldb sanitizer preset doesn't enable ASAN using the --enable-asan flag, it instead adds the option to LLDB_EXTRA_CMAKE_ARGS.
1 parent 5523c56 commit a280182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/build-script-impl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2909,9 +2909,9 @@ for host in "${ALL_HOSTS[@]}"; do
29092909
call mkdir -p "${results_dir}"
29102910
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} --xunit-xml-output=${results_dir}/results.xml"
29112911

2912-
if [[ "${ENABLE_ASAN}" ]] ; then
2912+
if test "${ENABLE_ASAN}" -o "$(echo ${LLDB_EXTRA_CMAKE_ARGS}|grep Address)"; then
29132913
# Limit the number of parallel tests
2914-
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} -j $(sysctl hw.physicalcpu | awk -v N=${LIT_JOBS} '{ print (N < int($2/2)) ? N : int($2/2) }')"
2914+
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} -j $(sysctl hw.physicalcpu | awk -v N=${LIT_JOBS} '{ print (N < int($2/1.5)) ? N : int($2/1.5) }')"
29152915
fi
29162916

29172917
FILTER_SWIFT_OPTION="--filter=[sS]wift"

0 commit comments

Comments
 (0)