1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Main Page

From llvmlibc

Jump to: navigation, search

Getting Started With LLVM Wrapper

  1. Checkout latest source via SVN
  2. Compile setstdio.c for your target platform using Clang. (The command line compile for this function is given in the file "build.sh".)
  3. Copy and paste stdio.llh into your LLVM Assembly file.
  4. Use the functions as documented below or listed in the source. (Take care to look up the order with regards to which parameters take FILE pointers in the setstdio.c sources and which take zero terminated strings. They are each listed in the header as i8* (pointer to bytes).)
  5. Assemble your bitcodes normally using llvm-as.
  6. Link any other bitcode files other than setstdio.bc to make a whole-program bitcode file.
  7. Invoke opt on your whole-program bitcode using standard optimizations if you want optimal code.
  8. Transfer your whole-program bitcode to the destination platform. (The following instructions should be executed by the packager or by the installer program.)
  9. Link your whole-program bitcode to setstdio.bc with llvm-link.
  10. Invoke opt on your newly created complete bitcode file using link-time optimizations.
  11. Run the complete bitcode file through llc.
  12. Assemble the resultant native assembly code with your native assembler (normally GNU as) if your platform doesn't support direct code emission.
  13. Link the resultant object file to LibC using the system linker (normally GNU ld) if your assembler doesn't automatically do so.
  14. The executable emitted should be able to execute normally.

LLVM Wrapper Documentation

Globals and structures used

Functions implemented and their descriptions

Everything else not implemented or planned to be implemented in this wrapper


Consult the User's Guide for information on using the wiki software.

Personal tools