<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55979>55979</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
possibly wrong output from llvm::sys::getDefaultTargetTripl on MacBookPro M1
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dmarkman
</td>
</tr>
</table>
<pre>
Hi, was able to build latest llvm from git on my MAcBookPro 16" M1 (macOS 12.4)
build produced "fat" libraries (x86_64 and arm64)
I wrote the small program
#include "llvm/Support/Host.h"
#include <iostream>
int main() {
std::string tripleDefault = llvm::sys::getDefaultTargetTriple();
std::string tripleProcess = llvm::sys::getProcessTriple();
std::cout << "default triple: " << tripleDefault << std::endl;
std::cout << "process triple: " << tripleProcess << std::endl;
return 0;
}
resulting binary was arm64 only architecture
when I run it I got
default triple: x86_64-apple-darwin21.5.0
process triple: x86_64-apple-darwin21.5.0
I was expecting to see something like
aarch64-apple-darwin21.5.0
or
arm64-apple-darwin21.5.0
anything but not x86_64
am I wrong?
or this is real issue?
thanks in advance
Dimitry Markman
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVEtvozAQ_jVwGTUCQ5Jy4NA2W7WHaFdq76sBO-CtsZFtmubf7xhokra7bZFlwN88vnl4KsMP5Z2M2A3s0QFWSoA3UA1ScVDohfOg1HMHO2s6aKQHo6E7wPaqvjbm6Zc1kK4ixmCbQsQuO6x_PkDKFnnEiijZRMnVZKq3hg-14CTEduiDhpKVRSuFC4ovl6vfqxxQc0DbrU7q97C3xhOpVoDrUKlgqrHYTXDEMqlrNXARLAemEbt9GPreWHJye2ecX7SEfJTObiSBVpCl7McMj7vUHjqUmlgRC4jW1wATAvPjPI-yK1qkL3UDtPdKbMQOB-XJ8mZM2SxycNNHI_ws8YiWfh5HpclJlF1_xwNluxbOfeJhlvin7SgpjmZrMwSiN7RC3vhMfXJDeDh8xd9HNx4eLQnN1Xdc9DP3T1ycwvvExWuGrPCD1ZCcfK8351W0whHdkLtKarSHqb1Da1EHqwN91q30oiYr4lxv3woN92AHDdTs99AYPwEfczT17AX29H_B0e6lZuliuUgmhY8Rf6FwbHhiKl564jaW3oAT1PumE74NB0o-zYwxBPGJQWNnuRD2F25RHybzFZVNGz-TfSPSwXgbdRNlt-eAsXQ9pQNadJ8Uvd0g3sn4FvUTiWhA_oy6fpP0jeykpxpt0T51qM-h_-0xLzNeZAXGXnolyt44Jysq7EgQqPl6CmScWt-9jGG0bfE417ZpPFhVtt73oxa7pUUTsB2qRW3CnJnHTXhdULX_UMXod4ze0cdyWayLuC2XWZ4nFaaY1gLzVV4IvrpcsxoLvsvrVRIrrIRyZbS8jpabWJYsYSxZpUm6ZmyZLpCzNFkX64xzVqVZHuWJoAGlFsHxwtgmtuXIoRoaR6CSzrsTiJSYRgvxah8H3xpb8m5KdjzyLUeyfwF369e1">