trill-lang / trill

A type safe, compiled language inspired by (and written in) Swift
MIT License
275 stars 15 forks source link

Explain build steps in README -- specifically, LLVM and GC #5

Closed modocache closed 7 years ago

modocache commented 7 years ago

I think the build process assumes that I have an LLVM install at /usr/local/llvm, is that right? I created a symlink there to my LLVM install, which is in a different location. Currently I'm encountering the error trill/Sources/Runtime/runtime.cpp:19:10: 'gc/gc.h' file not found. Where can I find this header?

harlanhaskins commented 7 years ago

Ah, yes, I need to re-do these build steps entirely.

For now, gc/gc.h comes from the http://tinygc.sourceforge.net project.

You'll also need to simlink Sources/Runtime/*.h into /usr/local/include/trill And symlink libtrillRuntime.a into /usr/local/lib

modocache commented 7 years ago

Got it, thanks! Besides being generally interested, I was mainly looking at this to see how you handled your LLVM dependencies. I'm creating a CMake-based project from scratch, and was wondering if there was any prior art.

For now, I think I'll do something similar to what you're doing here: require users to have built LLVM in advance, and point CMake to the build directory. But I'll try building and using Trill at some point in the near future, and will let you know how it goes!

harlanhaskins commented 7 years ago

Well, the next step for this is linking in LLVMSwift and using its bindings instead. I have that on a branch called LLVM-Refactor

modocache commented 7 years ago

Ah. But that library still references an LLVM installation at /usr/local, no?

harlanhaskins commented 7 years ago

That relies on an installation from homebrew, but yes!

harlanhaskins commented 7 years ago

I've updated the README with more comprehensive instructions in commit ecadced

modocache commented 7 years ago

Thanks! And I found a bunch more information on CMake here: http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project