Add support for FreeBSD's LD_32_LIBRARY_PATH
authorDimitry Andric <dimitry@andric.com>
Sat, 10 Aug 2019 19:07:38 +0000 (19:07 +0000)
committerDimitry Andric <dimitry@andric.com>
Sat, 10 Aug 2019 19:07:38 +0000 (19:07 +0000)
commitc09d88863284d88e01f90829ebe3fec2bc477c6c
tree174ae14db0acb4500f1448284bd1dd6b13766177
parentec128709f0ad35282d2e009dd333b1d8ca434c80
Add support for FreeBSD's LD_32_LIBRARY_PATH

Summary:
Because the dynamic linker for 32-bit executables on 64-bit FreeBSD uses
the environment variable `LD_32_LIBRARY_PATH` instead of
`LD_LIBRARY_PATH` to find needed dynamic libraries, running the 32-bit
parts of the dynamic ASan tests will fail with errors similar to:

```
ld-elf32.so.1: Shared object "libclang_rt.asan-i386.so" not found, required by "Asan-i386-inline-Dynamic-Test"
```

This adds support for setting up `LD_32_LIBRARY_PATH` for the unit and
regression tests.  It will likely also require a minor change to the
`TestingConfig` class in `llvm/utils/lit/lit`.

Reviewers: emaste, kcc, rnk, arichardson

Reviewed By: arichardson

Subscribers: kubamracek, krytarowski, fedor.sergeev, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D65772

llvm-svn: 368516
compiler-rt/test/asan/Unit/lit.site.cfg.py.in
compiler-rt/test/asan/lit.cfg.py
compiler-rt/test/xray/Unit/lit.site.cfg.py.in