<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114626>114626</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang multiarch is broken (at least on macOS)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alecazam
</td>
</tr>
</table>
<pre>
So macoOS clang seems to have left out multiarch support for precompiled headers. So I split out our arch specifications as such, and compiled each pch for each arch.
CXXARCH := -arch x86_64 -mavx2 -mf16c -mfma \
-arch arm64
The problem is now I need to pass the pch to the compiles. This requires use of -include-pch like so.
PRECOMPILED_CXXFLAGS += \
-include-pch $(PRECOMPILED_PCH_ARM)\
-include-pch $(PRECOMPILED_PCH_X64)\
But that doesn't work since it tries to link the x64 pch to the .o. So then I try -Xarch
PRECOMPILED_CXXFLAGS += \
-Xarch_arm64 -include-pch $(PRECOMPILED_PCH_ARM)\
-Xarch_x86_64 -include-pch $(PRECOMPILED_PCH_X64)\
That generates the following failure:
invalid Xarch argument: '-Xarch_arm64 -include-pch', options requiring arguments are unsupported
So I have no idea how to fix this. The -Xarch limitation is very limiting.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE1v4zYQ_TXUZWBDomTZPujgOOtugF0kiHPwLaCokciGIlV-OEl_fUFJ3rWBFkgvpGnMe5p582aYc7LTiBVZ3ZHVfcKCF8ZWTCFnf7M-qU3zWR0N9IybxyNwxXQHDrF34A0IdkZQ2HowwUMflJfMcgEuDIOxHlpjYbDITT9IhQ0IZA1atwSAo4EHcIOSE9YECxN0QC5byZmXRjtgDlzggtA9MN3ALyZkXMDAxfiJ8RHRS5Lek3Q3nfvTafe8_w4k35H8HhYj_cemfC0LWPTs_EFh0bdZyePVMyCr_QScQ5nty-Ka8EUgDNbUCnuQDrR5hwfQiE2UYmDOgY8RXMR3_DlnG-t9EdKBxb-CtOggOATTwkJqrkKDi4hR8g3BmZsSnp6_7R9_Pj38-Hb_uj-dDj92fxyB0LtYz690Sbq9ISK0IHRzDX3af3_dPf8kdHsNgi-gTmVxi4rnXfDgBfPQGHSa0LWHd2PfwEnNEaQHbyWO_lBSv41KfJTFtTBLM1vAC9TwAN5-wuIUVf_f1cMMfB3bdVvT16S4EFys8QWGf5XlJUrSoUbLPE5eaI1S5l3qDlomVbAYvTgGS31mSjZwmq3WhR61J_kOCF3_Z0WEruMkmGEajslPkf5C4IBZhKDnAcTmItJ0j0M3Dq02IBtkIMx7bEorP8ALOTkVZ0VAyV76cRCj389oP6e_pO5ubJo0Vd5s8y1LsMrWebpKyyIvE1GtszrNKEe6bTht123Ztpu0KelmU7fpdrVJZEVTWmRZStM0y1flcl3yFS35Ok8xbeoNkiLFnkm1VOrcL43tEulcwCrLipKWiWI1KndZXraKUYs6dI4UqZLOu984L73CalpgvzeVdFBb84YaCN0wDwqZ82B0XHiPR0K3SbCqEt4PLvaOHgg9dNKLUC-56Qk9RP75WgzW_IncE3oYk3SEHuY8zxX9JwAA__8rcbGr">