Another small documentation update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73596 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov 2009-06-17 02:56:08 +00:00
parent c447ff693e
commit 4aecec1f50
2 changed files with 13 additions and 12 deletions

View File

@ -33,7 +33,7 @@ example, as a build tool for game resources.
Because LLVMC employs TableGen_ as its configuration language, you Because LLVMC employs TableGen_ as its configuration language, you
need to be familiar with it to customize LLVMC. need to be familiar with it to customize LLVMC.
.. _TableGen: http://llvm.cs.uiuc.edu/docs/TableGenFundamentals.html .. _TableGen: http://llvm.org/docs/TableGenFundamentals.html
Compiling with LLVMC Compiling with LLVMC
@ -48,12 +48,12 @@ you shouldn't be able to notice them::
$ ./a.out $ ./a.out
hello hello
One nice feature of LLVMC is that one doesn't have to distinguish One nice feature of LLVMC is that one doesn't have to distinguish between
between different compilers for different languages (think ``g++`` and different compilers for different languages (think ``g++`` vs. ``gcc``) - the
``gcc``) - the right toolchain is chosen automatically based on input right toolchain is chosen automatically based on input language names (which
language names (which are, in turn, determined from file are, in turn, determined from file extensions). If you want to force files
extensions). If you want to force files ending with ".c" to compile as ending with ".c" to compile as C++, use the ``-x`` option, just like you would
C++, use the ``-x`` option, just like you would do it with ``gcc``:: do it with ``gcc``::
$ # hello.c is really a C++ file $ # hello.c is really a C++ file
$ llvmc -x c++ hello.c $ llvmc -x c++ hello.c
@ -148,13 +148,13 @@ generic::
To build your plugin as a dynamic library, just ``cd`` to its source To build your plugin as a dynamic library, just ``cd`` to its source
directory and run ``make``. The resulting file will be called directory and run ``make``. The resulting file will be called
``LLVMC$(LLVMC_PLUGIN).$(DLL_EXTENSION)`` (in our case, ``plugin_llvmc_$(LLVMC_PLUGIN).$(DLL_EXTENSION)`` (in our case,
``LLVMCMyPlugin.so``). This library can be then loaded in with the ``plugin_llvmc_MyPlugin.so``). This library can be then loaded in with the
``-load`` option. Example:: ``-load`` option. Example::
$ cd $LLVMC_DIR/plugins/Simple $ cd $LLVMC_DIR/plugins/Simple
$ make $ make
$ llvmc -load $LLVM_DIR/Release/lib/LLVMCSimple.so $ llvmc -load $LLVM_DIR/Release/lib/plugin_llvmc_Simple.so
Compiling standalone LLVMC-based drivers Compiling standalone LLVMC-based drivers
======================================== ========================================

View File

@ -46,12 +46,13 @@ Using LLVMC to generate toolchain drivers
LLVMC plugins are written mostly using TableGen_, so you need to LLVMC plugins are written mostly using TableGen_, so you need to
be familiar with it to get anything done. be familiar with it to get anything done.
.. _TableGen: http://llvm.cs.uiuc.edu/docs/TableGenFundamentals.html .. _TableGen: http://llvm.org/docs/TableGenFundamentals.html
Start by compiling ``example/Simple``, which is a primitive wrapper for Start by compiling ``example/Simple``, which is a primitive wrapper for
``gcc``:: ``gcc``::
$ cd $LLVM_DIR/tools/llvmc $ cd $LLVM_DIR/tools/llvmc
$ cp -r example/Simple plugins/Simple
# NB: A less verbose way to compile standalone LLVMC-based drivers is # NB: A less verbose way to compile standalone LLVMC-based drivers is
# described in the reference manual. # described in the reference manual.