<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 - Impossible to build Go and OCaml bindings on Windows using MSYS2"
href="https://bugs.llvm.org/show_bug.cgi?id=44551">44551</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Impossible to build Go and OCaml bindings on Windows using MSYS2
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows XP
</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>Support Libraries
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>stephen.gutekanst@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>It is currently impossible to build the Go and OCaml bindings on Windows
natively under e.g. MSYS2 due to two issues in the build configuration/scripts:
1.
[`build.sh`](<a href="https://github.com/llvm/llvm-project/blob/master/llvm/bindings/go/build.sh#L11">https://github.com/llvm/llvm-project/blob/master/llvm/bindings/go/build.sh#L11</a>)
cannot handle quoted arguments, which prevents passing `-G "MSYS Makefiles"` to
the script -- making it impossible to generate MSYS-compatible Makefiles.
2. In
[`config-ix.cmake`](<a href="https://github.com/llvm/llvm-project/blob/master/llvm/cmake/config-ix.cmake#L546-L547">https://github.com/llvm/llvm-project/blob/master/llvm/cmake/config-ix.cmake#L546-L547</a>)
WIN32 (i.e. non-Cygwin environments like MSYS or native Windows) explicitly
disables building the Go bindings without any way to attempt building them.
I have a simple patch here which resolves the issue for Go (but I haven't
tested OCaml, there could be other issues there). I have not yet had a chance
to submit this via LLVM's patch submission process, but hope to do so soon:
<a href="https://github.com/hexops/llvm-project/commit/3dd7f1a23d70c9e809fdda5b1d0f15175d6bfe8a?w=1">https://github.com/hexops/llvm-project/commit/3dd7f1a23d70c9e809fdda5b1d0f15175d6bfe8a?w=1</a></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>