<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - [windows] Cmake llvm build of MinGW under Cygwin fails: Posix filesystem calls."
href="http://llvm.org/bugs/show_bug.cgi?id=19390">19390</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[windows] Cmake llvm build of MinGW under Cygwin fails: Posix filesystem calls.
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows 2000
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rfoos@codeaurora.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>A CMake build using MinGW under CYGWIN fails in FileSystem.h. This is due to
the LLVM source code using Posix filesystem calls when LLVM_ON_UNIX is true.
Since MinGW can be used on both Cygwin/Unix, and Windows there is a conflict.
LLVM assumes that LLVM_ON_UNIX means that all posix filesystem calls are
present.
Since Mingw doesn't support posix filesystem calls, the build breaks early in:
include/llvm/Support/FileSystem.h
The information to identify this case is in CMakeCCompiler.cmake.
The final definition of the flags is in LLVMConfig.cmake
set(LLVM_ON_UNIX 1)
set(LLVM_ON_WIN32 0)
For MinGW, LLVM_ON_UNIX must be false and LLVM_ON_WIN32 must be true.
Linux or Windows is not quite correct for this case. A new HAVE_POSIX,
segragating the filesystem headers and api's would be more correct. This is a
bit more extensive involving source code, cmake build, and autoconf build.
Since mingw current builds with LLVM_ON_WIN32 set this way, the trivial change
should work.
The Host and Compiler information regarding Cygwin and MinGW are all present in
CMakeCCompiler.cmake for a starting point.
The variables needed by the build are set in LLVMConfig.cmake.</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>