[cfe-dev] bugs and grammar errors in clang's CMakeLists.txt

Nico Weber thakis at chromium.org
Fri Mar 14 17:30:39 PDT 2014


For grammar and spelling, just send a patch.


On Fri, Mar 14, 2014 at 4:54 PM, Zack Perry <zack.perry at sbcglobal.net>wrote:

> I have been working on building clang 3.4 standalone, and thus have gone
> over its bundled top-level CMakeLists.txt very carefully.
>
> There are numerous issues with this file, English, embedded comments, and
> logic. A few examples:
>
> English:
>
> # If we are not building as a part of LLVM, build Clang as an
> # standalone project, using LLVM as an external library:
>
> The above should be revised at least to
>
> # If clang is not built as a part of LLVM, then Clang is built as an
> # standalone project, using LLVM as an external library:
>
> Embedded comments:
>
>      9    set(CLANG_PATH_TO_LLVM_BUILD "" CACHE PATH
>     10      "Path to the directory where LLVM was built or installed.")
>
> where 9 and 10 are line numbers of the CMakeLists.txt.
>
> 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 "the directory where LLVM was built or installed"?
>
> Logic:
>
> Despite the fact that at the following statements (CMakeLists.txt line
> numbers given):
>
>     45
>     46    set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")
>     47    set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
>
> The two files:
>
>    - include/clang/Driver/Options.td
>    - include/clang/Driver/CC1AsOptions.td
>
> 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-(
>
> 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
> :(
>
> -- Zack
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140314/53fd3577/attachment.html>


More information about the cfe-dev mailing list