Skip to content

In Which I Get a Hand Getting a Leg Up on LLVM

November 2, 2014

I came across another LLVM back-end tutorial which targets a subset of the arm architecture called “leg”.
14-11-02 llvmleg

I poked at it briefly but it was based on LLVM 3.5 which required C++11 which means gcc 4.7 which i can’t get working on snow leopard and blah blah blah.

The good thing was there were contact email addresses for the developers who offered to answer questions. I sent a plea and got a response from Pierre-Andre Saulais who actually modified their code and repackaged it with LLVM 3.4 which is pre c++11. It’s not *quite* working yet but it’s way farther along than I’ve been so far.

Thanks very much to codeplay.

For my records, I

  • re-installed xcode to clean up whatever mess I might have made dinking around with gcc 4.7
  • downloaded-as-zip the directory llvm-leg-leg_for_release_34 from
  • unzipped that into ~/llvmleg34/llvm-leg-leg_for_release_34
  • made directory ~/llvmleg34/build
  • added cmake’s directory to the path with PATH=/Applications/
  • in that directory ran cmake -G “Unix Makefiles” -DCMAKE_BUILD_TYPE:STRING=DEBUG -DLLVM_TARGETS_TO_BUILD:STRING=LEG ../llvm-leg-leg_for_release_34
  • ran make -j2 (which i think runs two jobs at a time)

This eventually failed with
Scanning dependencies of target LLVMLEGInfo
make[2]: *** No rule to make target `lib/Target/LEG/’, needed by `lib/Target/LEG/TargetInfo/CMakeFiles/LLVMLEGInfo.dir/LEGTargetInfo.cpp.o’. Stop.
make[1]: *** [lib/Target/LEG/TargetInfo/CMakeFiles/LLVMLEGInfo.dir/all] Error 2

but i think fundamentally it’s ok and I’m hoping pierre-andre can spot the problem.


From → LLVM

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: