Loading
[test] Fix asan/scudo -shared-libsan tests with -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on
On x86_64-unknown-linux-gnu, `-m32` tests set LD_LIBRARY_PATH to `config.compiler_rt_libdir` (`$build/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu`) instead of i386-unknown-linux-gnu, so `-shared-libsan` executables cannot find their runtime (e.g. `TestCases/replaceable_new_delete.cpp`). Detect -m32 and -m64 in config.target_cflags, and adjust `config.compiler_rt_libdir`. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D108859