[cfe-dev] bugs and grammar errors in clang's CMakeLists.txt
Zack Perry
zack.perry at sbcglobal.net
Fri Mar 14 16:54:28 PDT 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140314/7a7e5f75/attachment.html>
More information about the cfe-dev
mailing list