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

    <tr>
        <th>Summary</th>
        <td>
            Backport 42c9354a928d4d9459504527085fccc91b46aed3 to release/17.x
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            release:backport,
            backend:loongarch
      </td>
    </tr>

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

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

<pre>
    /cherry-pick 42c9354a928d4d9459504527085fccc91b46aed3

This reverts commit c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956. This commit adds global state that is shared between clang driver and clang cc1, which is not correct when clang is used with `-fno-integrated-cc1` option (no integrated cc1). The -march and -mtune option needs to be properly passed through cc1 command-line and stored in TargetInfo.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkkFv5C4MxT8NuVgZERKScMhh2mqk__lfac8OeAJbBiIgnfbbr5JOt9e9gGTr_Z6fZczZLYFoYvKJyZcKt2Jjmv53H7_IBReWao7mc2Lioi2l9FmvTr9BJ7RqZYdKjKYzqpNK8k6KgY_yqrVWzdz1SKZl_IXx89f7al2GRO-USgYdbzdXQMteNt1VNLPQVz4S4oC6RTnM2GnqeItKj0r2JzjUDxUak2HxcUYPuWAhKBYLuAzZYiIDM5U7UQDtMSxgknunBBjMo6B1w8Qz3K3TdleFWEDHlEgXuNu_Opdhy2Tg7ooF1vP6GmLtQqElYSFT75ieQ1yLiwGYGEOEn_aXi9onJ6hvmLQ9RqhvZQv0rQpEJkOJMBOsKa6U_CesmHffYlPcFruDjuQYTO1doAOTS9yTugCvmBYq_4VrPFVmao1qFVY0Nb1qZDf2SlV2GlrRGKU4KaOGQY4D572Yh_aq2hmpMZWbBBctH7nioh0bdWqEGJGaWZtxHHvSrON0Q-dP3r_fTjEtlct5o6nvZKcqjzP5fNyQEIk8YSbWnmfUb2tMhQnBxDMTYi9QMKw9-xjDsi9l78mXKk07uJ63JbOOe5dL_rEqrnianh60f76-fa_fw4hLM5w-qi35yZayZtaembgwcVlcsdt80vHGxGV3fHz1muJv0oWJy5E0M3E5wv4JAAD__6EVB78">