Hi all, I'm in the process of creating a new LLVM project based on the instructions from http://llvm.org/docs/Projects.html. I have a bunch of questions: 1. What is the relationship between CMake and the configure + Makefile build systems for LLVM? If I intend to just use configure + Makefile, do I need to worry about any of the CMake stuff? 2. My first attempt was to copy the sample project, tweak the autoconf stuff, and remake. I ended up getting the follow error: llvm[2]: Linking Release+Asserts executable exe (without symbols) llvm/Release+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::FileDescriptorHasColors(int)': Process.cpp:(.text+0x525): undefined reference to `setupterm' Process.cpp:(.text+0x52e): undefined reference to `has_colors' It appears that the sample project doesn't contain a library dependency on vterm. In comparing the autoconf in sample with the one at the parent of LLVM, the sample one doesn't contain references to vterm. Is this intentional? 3. I decided to go the "simple" route of just hardcoding a Makefile that includes a Makefile.common that I wrote that hardcode defines LLVM_SRC_ROOT, LLVM_OBJ_ROOT, etc. When I did this, I got an error about a missing configure, so I added one. My next build complained about a missing config.status, so I added one. Neither of them do anything. At this point, I was able to build my library & tool without any issues. Is the intention that only configure exists in the source repository and that running it creates the config.status script? Is the intention of the config.status script that it recreates a configuration based on how it was configured? 4. I find all of the autoconf stuff somewhat confusing & overwhelming. I'd like to find a simpler configure script that does the appropriate variable substitution in my Makefile.common. Is there a reasonable example of that? Or would it be better to learn how to properly generate the autoconf configure scripts? Thanks, Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130812/e853540d/attachment.html>
"Matthew O'Connor" <thegreendragon at gmail.com> writes:> I'm in the process of creating a new LLVM project based on the instructions > from http://llvm.org/docs/Projects.html. > > I have a bunch of questions: > > 1. What is the relationship between CMake and the configure + Makefile > build systems for LLVM? If I intend to just use configure + Makefile, do I > need to worry about any of the CMake stuff?No, until you submit your project for incorporating into LLVM. At that time, you can ask for help or create the CMake stuff by replicating what similar parts of LLVM do (it's quite simple and repetitive.) If your project is not intended to be distributed with LLVM, you can ignore CMake (*) I don't know the traditional build so I can't help you with the other questions. * From time to time some LLVM developer proposes to ditch the traditional build and use CMake only. It can actually happen at some distant future.
On Mon, Aug 12, 2013 at 2:34 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:> "Matthew O'Connor" <thegreendragon at gmail.com> writes: > > > I'm in the process of creating a new LLVM project based on the > instructions > > from http://llvm.org/docs/Projects.html. > > > > I have a bunch of questions: > > > > 1. What is the relationship between CMake and the configure + Makefile > > build systems for LLVM? If I intend to just use configure + Makefile, do > I > > need to worry about any of the CMake stuff? > > No, until you submit your project for incorporating into LLVM. At that > time, you can ask for help or create the CMake stuff by replicating what > similar parts of LLVM do (it's quite simple and repetitive.) > > If your project is not intended to be distributed with LLVM, you can > ignore CMake (*) > > I don't know the traditional build so I can't help you with the other > questions. > > * From time to time some LLVM developer proposes to ditch the > traditional build and use CMake only. It can actually happen at some > distant future. >This project will not be incorporated into LLVM. How realistic is the possibility of moving to CMake only? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130812/28c9b215/attachment.html>
Only my first question (the one about CMake) was answered. Would someone be willing to answer my other questions so I can understand & pursue that route instead? On Mon, Aug 12, 2013 at 2:19 PM, Matthew O'Connor <thegreendragon at gmail.com>wrote:> Hi all, > > I'm in the process of creating a new LLVM project based on the > instructions from http://llvm.org/docs/Projects.html. > > I have a bunch of questions: > > 1. What is the relationship between CMake and the configure + Makefile > build systems for LLVM? If I intend to just use configure + Makefile, do I > need to worry about any of the CMake stuff? > > 2. My first attempt was to copy the sample project, tweak the autoconf > stuff, and remake. I ended up getting the follow error: > llvm[2]: Linking Release+Asserts executable exe (without symbols) > llvm/Release+Asserts/lib/libLLVMSupport.a(Process.o): In function > `llvm::sys::Process::FileDescriptorHasColors(int)': > Process.cpp:(.text+0x525): undefined reference to `setupterm' > Process.cpp:(.text+0x52e): undefined reference to `has_colors' > It appears that the sample project doesn't contain a library dependency > on vterm. In comparing the autoconf in sample with the one at the parent of > LLVM, the sample one doesn't contain references to vterm. Is this > intentional? > > 3. I decided to go the "simple" route of just hardcoding a Makefile that > includes a Makefile.common that I wrote that hardcode defines > LLVM_SRC_ROOT, LLVM_OBJ_ROOT, etc. > When I did this, I got an error about a missing configure, so I added > one. My next build complained about a missing config.status, so I added > one. Neither of them do anything. > At this point, I was able to build my library & tool without any issues. > Is the intention that only configure exists in the source repository and > that running it creates the config.status script? > Is the intention of the config.status script that it recreates a > configuration based on how it was configured? > > 4. I find all of the autoconf stuff somewhat confusing & overwhelming. > I'd like to find a simpler configure script that does the appropriate > variable substitution in my Makefile.common. Is there a reasonable example > of that? Or would it be better to learn how to properly generate the > autoconf configure scripts? > > Thanks, > Matthew > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130827/d8ca5a66/attachment.html>