<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/78650>78650</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[profile] remove libclang_rt.profile's use of environment variable?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pirama-arumuga-nainar
</td>
</tr>
</table>
<pre>
In https://github.com/llvm/llvm-project/blob/8649328060b4e748502d1d859f9c9c1bd3c2bccc/compiler-rt/lib/profile/InstrProfilingFile.c#L576, the profile runtime uses an environment variable to track and avoid re-initializing the profile file. This breaks some tests (e.g. Android bionic and toybox) that actually test `getenv` and `setenv`.
If there is no strong reason for using the environment variable, can this instead be replaced with just a static variable?
(cc: @vedantk, @gulfemsavrun, @ZequanWu )
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk0-PpDYQxT-NuZQaGfOn4cBhkhHSSDnkEClSLlHZFOAdY3fsMpvJp48g29lE2stejCjqPb3Cv8KU7OqJRtH-INrXAjNvIY4PG3HHG8a85xVvHq3HWOgwf4xvHjbmRxL1i1CTUNNqecu6NGEXanLueD5ujxg-kWGhJu2CFmrqu2aoVS87qRu6N30r1VzNfTssgxlMpefaKG2MEWoyYX9YR_EWT72zp_wRw2IdCTW9-cTx5-vV-nWyjkojVP1Te--E-hF4I_jSDDF7tjtBTpQAPZA_bAx-J89wYLSoHQEH4IjmHdDPgEewM0S6WW_ZorN_Wb_-z_M8SoBfNptAR8L3BCnsBEyJEwjVU7mW8OLneDppG7w1lzWHDx3-FGoA3pABDWd07uMSgujkSkz-EJ28ukUn07NQCvkq5Ms_59tyxokENoEPkDgGv0IkTMHDEiLk9Iz8rXHPX2TQA5_5rU9MOIMmiPRwaGiGz5Y3-JQTA0JiZGu-auvpv0mE6o0R9QuIRh40o-f30100cs1uoT3hEbP_UvqN_sjof80g1FDMYz0P9YAFjdVdtp2qm7YqtrEaJM3dsKjZtFjVshuWSt-17Nulb03bFnZUUjWyqgYpq3sty7YbJA2NrupKUlP1opG0o3XlCWEZ4lrYlDKN975rZeFQk0sX7kp5-gzXR6HUSX8cL3B1XpNopLOJ01cXtuyuPXly2L5CpD0cBM5q49Cvv0cu_6X0nk7oICzfvoR6KnJ043fv0pU3CTVd8_wdAAD__8RGPKc">