<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 --- - clang-cl: support UseNativeEnvironment"
href="http://llvm.org/bugs/show_bug.cgi?id=18723">18723</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl: support UseNativeEnvironment
</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 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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>marci_r@web.de
</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>Visual C++ 2013 has a amd64-x86 cross compiler. If you add
<UseNativeEnvironment>true</UseNativeEnvironment>
to your project file, the 64-bit compiler is used for building 32-bit
applications. This option is essential if you want to compile with the Visual
C++ November 2013 CTP and use precompiled headers as you get compiler errors
otherwise.
If you try to build a project with this option with clang-cl in Visual Studio,
you get the following error:
1>C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(341,5): error
MSB6006: "CL.exe" exited with code -1073741701.
This is because clang-cl is a 32-bit application and Visual Studio expects a
64-bit application. To fix this, there has to be a 64-bit version of clang-cl
and the following line has to be added for the toolset.props of the LLVM-vs2013
and LLVM-vs2013_xp toolsets, expecting a 64-bit executable in
msbuild-bin\amd64_x86:
<ExecutablePath Condition="'$(UseNativeEnvironment)' ==
'true'">$(LLVMInstallDir)\msbuild-bin\amd64_x86;$(ExecutablePath)</ExecutablePath></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>