<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Hi,</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">We would like to see that change, too, especially for lld/ELF.</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Chris, do you have a patch or just looking for help?</span><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:rgb(255,255,255); margin:0px">
<span style="font-size:10.5pt; font-family:Calibri,sans-serif">Best Regards,</span></div>
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:rgb(255,255,255); margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font size="2"><span lang="en-US" style="font-size:10.5pt">Igor Kudrin</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif; font-size:15px; background-color:rgb(255,255,255); margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font size="2"><span lang="en-US" style="font-size:10.5pt">C++ Developer,</span></font></span></font><span style="font-family:Calibri,sans-serif; font-size:14.6667px"> </span><span style="font-family:Calibri,sans-serif; font-size:14.6667px">Access
Softek, Inc.</span></div>
</div>
</div>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> llvm-dev <llvm-dev-bounces@lists.llvm.org> on behalf of Rui Ueyama via llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Sent:</b> Friday, February 23, 2018 6:37 AM<br>
<b>To:</b> Chris Jackson<br>
<b>Cc:</b> llvm-dev<br>
<b>Subject:</b> Re: [llvm-dev] RFC: LLVM - lld - Add visual studio compatible diagnostics output to lld</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>I understand that making lld's error message compatible with MSVC makes it easy to use in IDEs. But at the same time I personally prefer the current style of lld's error message because it's easier to read particularly when filenames or symbol names are
long (which is a norm in modern projects).</div>
<div><br>
</div>
<div>I'd start with experimenting your idea with a small change. I guess that the error message you want to format in the MSVC style is almost always "missing symbol" error. You could change only that message locally so that lld prints it out in the MSVC style.
If that works for you, then I guess you can demonstrate that to convince broader audiences, and we can discuss how we will adopt that change. What do you think?</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Feb 19, 2018 at 7:21 AM, Chris Jackson via llvm-dev
<span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div>RFC: lld- Add visual studio compatible diagnostics output to lld</div>
<div><br>
</div>
<div>Hello all,</div>
<div><br>
</div>
<div>We have a proposal to extend the diagnostics output capabilities of lld.</div>
<div><br>
</div>
<div>## Problem</div>
<div><br>
</div>
<div>MS Visual Studio expects the diagnostic output of build tools to conform to a specific format, described here: [1] and [2] . Currently lld cannot emit warnings and errors in this format. lld prefixes diagnostic output with args[0], which can be a full
path to the lld executable. If a diagnostic message of this format is clicked within visual studio, the program </div>
<div>attempts to open the linker executable for edit, as this is interpreted as a source code file. Normally this causes visual studio </div>
<div>to become unresponsive until the file open operation times out. This output in its current format is displayed in visual studio as:</div>
<div><br>
</div>
<div>------ Build started: Project: lldDiagnostics, Configuration: Debug ------</div>
<div>X:\bin\lld.exe : error : undefined symbol: foo</div>
<div>>>> referenced by diagMain.cpp:5 (X:\lldDiagnostics\<wbr>lldDiagnostics\diagMain.cpp:5)</div>
<div>>>> Debug\diagMain.o:(main)</div>
<div>Done building project "lldDiagnostics.vcxproj" -- FAILED.</div>
<div>========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</div>
<div><br>
</div>
<div><br>
</div>
<div>## Proposed Solution </div>
<div><br>
</div>
<div>We propose the addition of an option to output diagnostics that fully conform to [1]. There is currently an option in clang that enables VS compatible output, '-fdiagnostics-format=msvc' [3] [4]. This will enable visual studio to parse the full diagnostic.
This will </div>
<div>result in clickable links so that the IDE can display the source from which the error or warning originates, as well as adding errors and warnings to the error list.</div>
<div><br>
</div>
<div>A visual studio conformant diagnostics output would look something like:</div>
<div><br>
</div>
<div>X:\lldDiagnostics\<wbr>lldDiagnostics\diagMain.cpp(5) : error : undefined symbol ‘foo’ referenced in function ‘main’ in file ‘Debug\diagMain.o’</div>
<div><br>
</div>
<div>VS would be display this as:</div>
<div><br>
</div>
<div>------ Build started: Project: Project1, Configuration: Debug Win32 ------</div>
<div>Link : error : L0039: reference to undefined symbol `foo' in file "X:\lldDiagnostics\<wbr>lldDiagnostics\diagMain\<wbr>diagMain.o"</div>
<div>X:\lldDiagnostics\<wbr>lldDiagnostics\diagMain.cpp : error : L0039: reference to undefined symbol `foo' in file</div>
<div>"X:\lldDiagnostics\<wbr>lldDiagnostics\diagMain\<wbr>diagMainSource.o"</div>
<div>========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</div>
<div><br>
</div>
<div>Thanks.</div>
<div><br>
</div>
<div><br>
</div>
<div>Best Regards,</div>
<div><br>
</div>
<div><br>
</div>
<div>Chris</div>
<div><br>
</div>
<div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<br class="m_-8019554560586331285gmail-Apple-interchange-newline">
[1] <a href="https://docs.microsoft.com/en-us/cpp/ide/formatting-the-output-of-a-custom-build-step-or-build-event" target="_blank">
https://docs.microsoft.com/en-<wbr>us/cpp/ide/formatting-the-<wbr>output-of-a-custom-build-step-<wbr>or-build-event</a></div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
[2] <a href="https://blogs.msdn.microsoft.com/msbuild/2006/11/02/msbuild-visual-studio-aware-error-messages-and-message-formats/" target="_blank">
https://blogs.msdn.microsoft.<wbr>com/msbuild/2006/11/02/<wbr>msbuild-visual-studio-aware-<wbr>error-messages-and-message-<wbr>formats/</a></div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
[3] <a href="https://clang.llvm.org/docs/UsersManual.html#cmdoption-fdiagnostics-format" target="_blank">
https://clang.llvm.org/docs/<wbr>UsersManual.html#cmdoption-<wbr>fdiagnostics-format</a></div>
<div style="color:rgb(34,34,34); font-family:arial,sans-serif; font-size:small; font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
[4] <a href="http://lists.llvm.org/pipermail/cfe-dev/2011-May/015115.html" target="_blank">
http://lists.llvm.org/<wbr>pipermail/cfe-dev/2011-May/<wbr>015115.html</a></div>
<br>
</div>
<div><br>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>