<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62577>62577</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Why are multiple --target flags allowed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            question,
            clang:driver
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hiraditya
      </td>
    </tr>
</table>

<pre>
    clang simply takes the last `--target` flag.
```
./bin/clang -O0 -target riscv64-linux-android10000 --target=riscv64-linux-gnu test.c -c
```

Why is this allowed, should we error out when multiple `target` flags are passed?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxskcGO2yAQhp9mfEG2YBwc-8Bhu5GvPfaMzcSmJSZlYLd5-8pJdquVKiEQCD7m-8cy-2UjMqC_gT5VtuQ1JrP6ZJ3PN1tN0d3MHOy2CPaXa7iJbH8Ri7ySCJazgE7WdbZpoQydFOdglwbkCeQLdPI57tsGcJz8Bjg-cPV3KZ4PRfI8v3WHOvit_Knt5lL0TkkppfiEt6evt5atiEycm1nU839_fMw_1pvwe8GehQ0hvpMDfBW8xhKceCdBKcUkYsnifaVNXErI_hpoN_vqxcImElfLTA7asXKmdUM72IqM6vq2VQfV6Wo16ozDcHSHvred1TSps-0JUUtn-x7bvvIGJbZSS60G1UndSDUce4XdQNPZaVJwkHSxPjQhvF2amJbKMxcyHerjsQp2osD3liH-LsTZxw0QAV8B8Z4utC8u-TdK-7E-VcnspHoqC8NBBs-Z_7Gzz4HMntPu9-n_kfyH-yO7qqRg1pyvDO0L4Ag4Lj6vZWrmeAEcd-pzqa8p_qQ5A4738hlwvBv8DQAA__9dvsbp">