[LLVMdev] creating new llvm project?

Matthew O'Connor thegreendragon at gmail.com
Mon Aug 12 13:19:10 PDT 2013


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>


More information about the llvm-dev mailing list