<div dir="ltr"><div>You can construct the triple from the variables CMake provides, we already do this for some of the targets: <a href="https://github.com/llvm/llvm-project/blob/00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097/llvm/cmake/modules/GetHostTriple.cmake">https://github.com/llvm/llvm-project/blob/00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097/llvm/cmake/modules/GetHostTriple.cmake</a></div><div><br></div><div>I'd prefer expanding GetHostTriple.cmake until it covers all the targets we support. I don't think it'd necessarily require reimplementing all of config.guess, since config.guess covers a lot of targets most of which aren't supported by LLVM.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 3, 2021 at 8:59 AM Harald van Dijk via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 02/04/2021 22:52, Michael Kruse wrote:<br>
> Is there a possibility to ask CMake for the host's triple?<br>
<br>
There isn't, unfortunately: CMake does not use triples and does not <br>
provide it in a variable. It does provide us with predefined variables <br>
that provide information similar to what uname gives, which could be <br>
used to build the triple ourselves, but that would amount to rewriting <br>
config.guess in CMake.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>