<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Building LLVM Runtimes with MinGW impossible"
href="https://bugs.llvm.org/show_bug.cgi?id=48898">48898</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Building LLVM Runtimes with MinGW impossible
</td>
</tr>
<tr>
<th>Product</th>
<td>Build scripts
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>cmake
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>markus.boeck02@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I have an LLVM build that which uses the LLVM_ENABLE_RUNTIMES option and then
builds many different runtimes for different target triples. Among those are
eg. x86_64-pc-windows-msvc and x86_64-w64-windows-gnu.
Prior to LLVM 12 this worked without problems and when building builtins or
runtimes it'd use clang and clang++ for the GNU targets and clang-cl for the
msvc targets by adding variables such as
BUILTINS_x86_64-pc-windows-msvc_CMAKE_SYSTEM_NAME to "Windows".
I am suspecting that since commit c74da051b8680d322328a1ba2e6c2ed794a74f59
it is now always setting the CMAKE_SYSTEM_NAME to Windows by default, which
makes a lot of sense, but now clang-cl is always selected which leads to
runtimes targeting GNU being built with an msvc target instead.
The fact that it worked before was more of an coincident to be fair, since
apparently CMAKE_SYSTEM_NAME used to be blank. I also don't know how one would
be able to fix this. Maybe an argument to llvm_ExternalProject from the
runtimes/CMakeLists.txt script that passes the target triple? I don't know.
If you do know any workarounds in the meanwhile that'd be great as well.
Until then using the LLVM_ENABLE_RUNTIMES option simply won't work with MinGW
targets.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>