<div dir="ltr">For grammar and spelling, just send a patch.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 14, 2014 at 4:54 PM, Zack Perry <span dir="ltr"><<a href="mailto:zack.perry@sbcglobal.net" target="_blank">zack.perry@sbcglobal.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif"><div style="font-family:arial,helvetica,sans-serif;font-size:12pt">
I have been working on building clang 3.4 standalone, and thus have gone over its bundled top-level CMakeLists.txt very carefully.</div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
There are numerous issues with this file, English, embedded comments, and logic. A few examples:</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><br></div>
<div style="background-color:transparent"><font face="arial, helvetica, sans-serif"><span style="font-weight:bold">English</span>: </font></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
<span style="background-color:transparent"><font face="arial, helvetica, sans-serif"><br></font></span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
<span style="background-color:transparent"><font face="arial, helvetica, sans-serif"># If we are not building as a part of LLVM, build Clang as an</font></span></div><div style="background-color:transparent"><font face="arial, helvetica, sans-serif"># standalone project, using LLVM as an external library:</font></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><font face="arial, helvetica, sans-serif"><br></font></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
<font face="arial, helvetica, sans-serif">The above should be revised at least to</font></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><font face="arial, helvetica, sans-serif"><br>
</font></div><div style="font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><span style="background-color:transparent"># If clang is not built as a part of LLVM, <span style="font-style:italic">then</span> Clang <span style="font-style:italic">is built </span>as an</span></div>
<div style="background-color:transparent;font-size:16px;font-family:arial,helvetica,sans-serif"><font face="arial, helvetica, sans-serif"></font></div><div style="background-color:transparent"><font face="arial, helvetica, sans-serif">#
 standalone project, using LLVM as an external library:</font></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><font face="arial, helvetica, sans-serif"><br>
</font></div><div style="font-size:16px;font-style:normal;background-color:transparent;font-family:arial,helvetica,sans-serif"><font face="arial, helvetica, sans-serif"><span style="font-weight:bold">Embedded comments</span>:</font></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><font face="arial, helvetica, sans-serif"><br></font></div><div style="background-color:transparent"><span style="font-family:arial,helvetica,sans-serif">     9    set(CLANG_PATH_TO_LLVM_BUILD "" CACHE PATH</span></div>
<div style="background-color:transparent"><span style="font-family:arial,helvetica,sans-serif">    10      "Path to the directory where LLVM was built or installed.")</span></div><div><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
<span style="font-family:arial,helvetica,sans-serif">where 9 and 10 are line numbers of the CMakeLists.txt.</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
<span style="font-family:arial,helvetica,sans-serif"><br></span></div><div style="font-size:16px;font-family:arial,helvetica,sans-serif;background-color:transparent"><span style="font-style:normal"><span style="font-family:arial,helvetica,sans-serif">OK. On a linux system, normally you specify a INSTALL_PREFIX or
 simply PREFIX for a software package.  Also, depending on the distribution, different parts of LLVM are installed at different places, e.g. all cmake modules go to /usr/share/llvm/cmake, executables go to /usr/bin etc.  So, what do you mean by "</span>the directory where LLVM was built or </span><span style="font-style:italic;color:rgb(255,0,0)">installed</span>"?</div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
<span style="font-weight:bold">Logic</span>:</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
Despite the fact that at the following statements (CMakeLists.txt line numbers given):</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><br></div><div style="background-color:transparent">
<span style="font-family:arial,helvetica,sans-serif">    45  </span></div><div style="background-color:transparent"><span style="font-family:arial,helvetica,sans-serif">    46    set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")</span></div>
<div style="background-color:transparent"><span style="font-family:arial,helvetica,sans-serif">    47    set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})</span></div><div><br></div><div>The two files:</div><div style="background-color:transparent">
<ul><li><span style="font-family:arial,helvetica,sans-serif;background-color:transparent">include/clang/Driver/Options.td</span><br></li><li><span style="font-family:arial,helvetica,sans-serif;background-color:transparent">include/clang/Driver/CC1AsOptions.td</span><br>
</li></ul></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'Times New Roman'"><span style="font-family:arial,helvetica,sans-serif;background-color:transparent">are not aware of them. Thus, standalone build for clang 3.4 would fail unless the include statement in the two files are edited - hackish and kludgy x-(</span><br>
</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><span><span style="font-family:arial,helvetica,sans-serif"><br></span></span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
<span><span style="font-family:arial,helvetica,sans-serif">I would be delighted to report more of such defects, but what is the protocol to submit them?  I don't work on LLVM as a regular part of my job :(</span></span></div>
<span class="HOEnZb"><font color="#888888"><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><span><span style="font-family:arial,helvetica,sans-serif"><br></span></span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif"><span><span style="font-family:arial,helvetica,sans-serif">-- Zack</span></span></div></font></span></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>