<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62077>62077</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Merge a78816a6b6debb548efbf1717aeeb490df42f401 into 16.0.2
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
brad0
</td>
</tr>
</table>
<pre>
[clang][driver] Pass -femulated-tls through to the linker in LTO mode
Currently the driver does not propagate the `-f[no-]emulated-tls` flags
to the linker under LTO. This can be surprising when the platform
defaults differ from the flags being passed. A related discussion can be
found in https://reviews.llvm.org/D143619. While the focus there was
RISC-V support, the root cause was that setting `-femualted-tls` and
`-flto` when compiling with Clang resulted in missing symbols because
the platform defaults for Android differed from the flags being passed
to Clang.
This patch changes the Clang driver's behavior to pass the emulated-tls
flags through to the linker when compiling with LTO/ThinLTO.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k82K7DYQhZ9G3hRtLPmn3QsvZqZpCNxwQzIka9kqWUpkyehnhnn7ILUz6YHL3dhgleqc-uqYh6BXiziR_pn014qnqJyfZs9FU81OfOSDxXC7kv5K-mfh9Rt60l_hNx4CnCRuyfCI4hRNgKi8S6uC6CAqBKPtP-hBW_j2-h02J5A0V9I83Z8vyXu00XyU2ntjEA4DWBdh927nK49YTsnQnCTpn607kf76qEmGBqTha7g3_aqcrECfxWt4VTrAwi3MCCH53eug7QrvCm25sRsepfPbvY1AyZOJAYSWEj1I77ZSVqRgxnx35yGgqOEJPBY_IHRYUgja2UPq3k26ZEXGoGLcA2mfCLsRdvP4pvE91Ma8bbXzK2G3K-3agV5q-Etpcx9duiVlsugR3vkx5u-__PFy-hNC2nfnI2EvpdQ7F2HhKZRKiIpHCBhjNlsI4pa4eQDHrTg2kk9NdPljQbK4bdemENJRwUtOAHgMKV_Po2w6FIDhY5udyUiK8LGFB6DwyVI6D09WeKfFwRXFz8h-brSo14_ZKdvceVwULIrbFQuhw-aRUXbO7RR_087nROampepLfO4LKto_Tu-PcHx7_U7Y7VVpm7NViakVl_bCK5zoMFLW9013qdSEnDc9a0cpR9oOfJj7GcdR0oWNlLedrPTEGtY2HaWspWd2qYd2QWxZt3T9MuCFkq7BjWvzmZFKh5BwGlhzPleGz2jCf7-un3LRaU5rIF1jdIj_R6uKOhqcfkW_IvDzONJsZxA4z303opwlPdMzR5y7SyNkx2TXUNA2OqBD3dSsSt5MX-O76qjSXC9uI-yWhY7Xaffub1wiYbdiNhB2K37_DQAA__8l93iJ">