<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95108>95108</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
warning if compiling and linking using [-no]-pie
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nolange
</td>
</tr>
</table>
<pre>
When linking for windows you will get false warnings, see:
``` bash
echo "int main() {return 0;}" | clang++ --target=x86_64-windows-gnu -x c++ -pie -
```
Will result in:
```
clang++: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
```
Despite the clang invocation doing linking. When targeting Linux there is no warning.
Using Clang 18.1.6 on Debian x86_64.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kk2PnDwMxz-NuVggMMPbgcPOojk910d7rAJ4IG1IRnnZ2f32VWCmXVVqJQQkcezf3_4L5-SimXuozlANiQh-NbbXRgm9cDKa-bN_W1mjkvqH1AtejcW71LO5O_w0Ae9SKVzY41Uox3gXVku9OKBXdMxQvkA-QP581_nx4CjceuzxtBoEIqk9bkJqoBaoQ2jOln2wGnMoz9AMQITQvOIUyYDOQGdMUy_swh7K4aOtv9Wn9IGWLjpg-oHTM_AmGdM_IL6SvUUZll1QHqX-G_ax_EIA5ctTcvwVdgkba49BB8czzsHGnk1mu0klvDQxMwI1kQeoQajO6dsRnE5m24SeUyU1p89MUA3_oB7Y3aRn9CsffUGp3820V8LZxNqPuWW4T_FoV9z_T-rwES9aRulQm6eO7GuB_12Mfd1TF21WZDUajQOPUmg8Wp4lc1_OXdmJhPuiKdqioLKqk7XP66Jt2oqv1URlSaM45W05lTzXXVtOY5PInnI65XVRFCVVVZ1xzcV4bdqy446v4wynnDchVabU-5YZuyTSucB9VxV5mygxsnK7c4k033E_BKJoZNvHO-kYFgenXEnn3e8sXnrF_UMwyutjQnEh9PzL62FXH2ekDVTDbqIkWNWv3t9cNAldgC6L9GsYs8lsQJdY4_FJb9Z858kDXXYyB3Q5yN97-hkAAP__PHkRwA">