<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58513>58513</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Use environment variables for tmp directory in LLVM test suite
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mcriley821
</td>
</tr>
</table>
<pre>
Hello,
I'm trying to build and install LLVM 15.0.3 from source on my Android in the termux environment.
I built like so:
```
cmake -B build -S llvm -G Ninja -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_TARGETS_TO_BUILD=AArch64
cd build
ninja
ninja check-all
```
This builds with the latest termux clang compiler, 15.0.2.
The `check-all` target finishes with 7 failures in llvm-unit, 6 due to no access to `/data/local/tmp` directory.
I fixed those 6 by changing the path in `llvm/utils/unittest/googletest/src/gtest-port.cc` to the tmp directory provided by termux, but I think trying to use environment variables like TMPDIR before a default path could be beneficial for platforms that don't have access to `/tmp` or whichever system tmp directory.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1U9tu2zAM_Rr7hYjhS-IkD35Il3YLlm5Fmw7bUyDLdKxVlgJd0mVfP8pO13XDDAESTYo8PDyqdXOuPqCUOsrfRemK1ibK5z04cxbqAE5D7YVsgKkGhLKOSQnb7ZdbyGZJmhTQGt2D1d5wBK2gP8NKNUaLEA2uQ3Boev8DUJ2E0apH5RK4FBpSO5DiCSlFVISfUZleVroC-njPyDu5usCYPICUpx4m7-GTUN8ZTNbvblcfr_ebTw-71Xa7v7u_vtl8jYp1lE_H8--Qq8fNdr3ffbu7JvetUA_iJ96jJH9oaL9b3b-_3j3sd5_HSAparQzvyukLlGYEcTHVUP-NwTvkTxOi6K9Gdp2w410Lz8J1AzGSObTuhR8uGdHNdX8UEg0NYyQ4T0audnSBcr0WKFNwzBzQQSuUsB1eMs-hZUJ6QzYNIHA18Uq4kLCExmOYqNLAOEdrgxEQ5jcNc4w2qTmTtLv-GCo0wiB32pyTl4m14gc2BF9bpHz1mVom3INSCOGREQIqS3dDZUrknZA27IQhtEvHg9YHiRfDGh5-BWty1MYlnA-t6VE7_fEVAxyNPomGylPZkbXQVe0dbChaqKc_ROsJ3x-SgxMzgtWSWBnUtru9W2_uocZWGwQGDbbMkxSHBrj2pLQaaSlsBRdMAsXBkSZGe0-0dcxBoxW9FAcdO-E_fF4IpFvPnaCpndCAPVuH_dumkhirrCzLIpsWizRuqqJZFksWO-EkVo__7SLgecsO0T68y0FU1guHEHsjq865ow1vK78JTJNGfJ2QzsK0xxkNIiFyv1MmMoW1HsPMZotZVsRdtcxxViyWPMsQa84WJZbTdtnO5jlbpHPEWLIapa2i2VWU5wqfYUhB52i2jkWVp3mepbSytMzTBNmS1Xy6SDPOisV8Hk1T7EmzScCRaHOITTVAqv3BklMK6-yrk1krDgpxKEf5mSc1mqrnhh7OeZFn8VC9GtD_AqnGl9g">