<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJylVE1v2zAM_TXyhbDhyLHdHHzImmWXAgPWAj3LFmNrk6VAH83670c5yYp2W4FtF0ciqcfHRzK9lc_dZwPezghHLcLButkzfgusKfPcBa16Vu3oOw4DmRjfv3IMdj4qjY4MZAdr9DOIwwGHAGFCoCAnnEJPJ_MNZQHXXJbcbkmkwuWFX56MaNCJgBIGK7GArQcfh-kSaRAlxVnoia7wnsKEBwG3-7vtp3sQhu5wt1tuBTwQ3tHZXuMMKsGLQBRf6oQTkcDfpE3ZJvGkzJiSKnPFD06NI_GmJNFEyp6TADNlzak-zIUb44wmwEk4Q48LeJwwFfp-kYmbgEGLlG4-ElvCEEERVYlBKH1m3kelJfhnH5Co-8lGLQ3jbUhiDNYM6AwhnlSYClbuWLk9f-8fvrDqcs5TX4MlQeFgbbG09MVxppAPZx-87T8ZApWIgSxCuGFq1qnu-D0nBZxVMo1AzqqPYOxVgn9DV81N8wdoOlyhqy38VPzcDpDRpaadx3KRMEWRSL_MMm-B1R_yx_f6yOodpctkV8lNtRGZiGGyrhupEKninEWnuymEo0_60mbw_Ujix74gNLpo_XT9yWkMv1L76aq8j0iTv6-ratNmU8dFJdaITdPLmstmtZFD2axXohHtRrYUokWP2ndEl3Fu8AQLBJ2JX_b_DFTHS87LFa_Llt_wVXHAuuFr2YpSSlGv1mxd4kxjWCScwroxc90C2cfRk1MrH_yLk9ZSjbSoC2FiGFTQ2F0a8LcrlPb19Z9TttDvFu4_AKJylCQ>53397</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
--rtlib triggers a unused-command-line-argument warning on some platforms
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
glandium
</td>
</tr>
</table>
<pre>
On some platforms, `--rtlib=libgcc`/`--rtlib=compiler-rt` only affect the libraries linked. On some others, it affects the generated code. As such, it needs to be passed as a CFLAGS and a LDFLAGS. The problem is that on platforms where the generated code, having it in CFLAGS triggers a unused-command-line-argument warning. Whether it affects the generated code is a clang implementation detail that build systems shouldn't be concerned with.
STR:
- `touch foo.c`
- `clang -c foo.c --rtlib=libgcc --target=aarch64-linux-android` -> no warning
- `clang -c foo.c --rtlib=libgcc --target=i686-linux-android` -> `warning: argument unused during compilation: '--rtlib=libgcc' [-Wunused-command-line-argument]`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydU8lu2zAQ_RrpMpCgUJYUH3Rw47qXAAWaADlT5EhiS5EGl7j5-w5lu0G6BGgvEjkzfO_NNlj50n824O2CcNQ8jNYtPmN3kLVVUbig1ZDVe_pOQpApY4c3DmGXo9LoyEB2sEa_AB9HFAHCjEBBjjuFnk7mG8oSrlyW3G4lUuHywq9PJjToeEAJwkosYefBRzFfIg2ipDgLA8nl3lMY98Dh7nC_-_QA3NAd7vfrrYRHwjs6O2hcQCV4Hkjia55wIhH4B9rENvNnZaZEqswVPzg1TaSbSKKJxF5QARZiLSg_LLib4oImwIk7Q49LeJoxJfp-kkkbB6F5oluOpJYweFAkVWLgSp-VD1FpCf7FByTpfrZRS5OxLqRiCGsEOkOIJxXmMqv2WbU7fx8ev2T15VykvgZLBYXR2nJt6avjLKEQZx_82n8yBEoRA1k4d2JuNynv-L2gCjirZBqBIqs_grHXEvwfumpv279A0-EKXe_gZ8XP7QAZXWraeSzXEqYoKtJvs8w6yJoPxdN7fcyaPdHlsq_ltt7yPKigsb9A_eswpMl7u2Z5dLqfQzj61B_aLHaYqHlxKAmILlo_X38FjfFXGh-6Ku8j0uYcmrredvnc47att2Mr2uZ2ZEPddawZZSuw2daiqUi_5gNq31O6GWMGT7BC0Jnyy1XPKsaqG9ZUHbtlN-WITcs2suOVlLy52WSbChcawjLpKK2bctevkoY4eXJq5YN_ddJSqonWdKUjfB7DbF0_UfOliku-cver9h9VAH5e">