<html>
<head>
<base href="https://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 should set -fms-compatbility-version according to the environment"
href="https://llvm.org/bugs/show_bug.cgi?id=27215">27215</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl should set -fms-compatbility-version according to the environment
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nikolai.kosjar@theqtcompany.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The documentation [1] states that clang-cl should be run in e.g. a "Command
Prompt where the environment has been set up using e.g. vcvars32.bat."
Having a MSVC2015 (32 Bit environment) and running clang-cl in that one does
not set -fms-compatbility-version accordingly:
<span class="quote">> CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
> D:\work>D:\usr\llvm-3.8.0\bin\clang.exe -### D:\empty.cpp</span >
clang version 3.8.0 (branches/release_38)
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: D:\usr\llvm-3.8.0\bin
"D:\\usr\\llvm-3.8.0\\bin\\clang.exe" "-cc1" "-triple"
"i686-pc-windows-msvc18.0.0" "-emit-obj" "-mrelax-all"
ncremental-linker-compatible" "-disable-free" "-main-file-name" "empty.cpp"
"-mrelocation-model" "static" "-mt
-model" "posix" "-mdisable-fp-elim" "-fmath-errno" "-masm-verbose"
"-mconstructor-aliases" "-target-cpu" "pent
"-dwarf-column-info" "-debugger-tuning=gdb" "-resource-dir"
"D:\\usr\\llvm-3.8.0\\bin\\..\\lib\\clang\\3.8.0"
ternal-isystem" "D:\\usr\\llvm-3.8.0\\bin\\..\\lib\\clang\\3.8.0\\include"
"-internal-isystem" "C:\\Program Fi
x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE" "-internal-isystem"
"C:\\Program Files (x86)\\Microsoft Visua
dio 14.0\\VC\\ATLMFC\\INCLUDE" "-internal-isystem" "C:\\Program Files
(x86)\\Windows Kits\\10\\include\\10.0.1
0\\ucrt" "-internal-isystem" "C:\\Program Files (x86)\\Windows
Kits\\NETFXSDK\\4.6.1\\include\\um" "-internal-
em" "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\\\shared"
"-internal-isystem" "C:\\Program Files (x8
indows Kits\\8.1\\include\\\\um" "-internal-isystem" "C:\\Program Files
(x86)\\Windows Kits\\8.1\\include\\\\w
"-fdeprecated-macro" "-fdebug-compilation-dir" "D:\\work" "-ferror-limit" "19"
"-fmessage-length" "115" "-fms
nsions" "-fms-compatibility" "-fms-compatibility-version=18" "-std=c++11"
"-fno-threadsafe-statics" "-fdelayed
late-parsing" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-o" "C:\\Users\\nik\\App
\Local\\Temp\\empty-e37cbc.o" "-x" "c++" "D:\\empty.cpp"
"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\link.exe"
"-out:a.exe" "-defaultlib:libcmt"
ogo" "C:\\Users\\nik\\AppData\\Local\\Temp\\empty-e37cbc.o"
Note the -fms-compatibility-version=18 argument. Expected is
"-fms-compatibility-version=19" for MSVC2015.
[1] <a href="http://clang.llvm.org/docs/UsersManual.html#clang-cl">http://clang.llvm.org/docs/UsersManual.html#clang-cl</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>