diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:12 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:12 +0000 |
| commit | b2f21fb044b6b5c52cff6227f9f79ca4ed42b18f (patch) | |
| tree | 86c1bc482baa6c81fc70b8d715153bfa93377186 /tools/llvmc/doc/LLVMC-Tutorial.rst | |
| parent | 600c6fa13de5c407dc36dbb0ab73807868741ae0 (diff) | |
Notes
Diffstat (limited to 'tools/llvmc/doc/LLVMC-Tutorial.rst')
| -rw-r--r-- | tools/llvmc/doc/LLVMC-Tutorial.rst | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/llvmc/doc/LLVMC-Tutorial.rst b/tools/llvmc/doc/LLVMC-Tutorial.rst index 6f0647784245..e7e8f081e0f1 100644 --- a/tools/llvmc/doc/LLVMC-Tutorial.rst +++ b/tools/llvmc/doc/LLVMC-Tutorial.rst @@ -46,23 +46,28 @@ Using LLVMC to generate toolchain drivers LLVMC plugins are written mostly using TableGen_, so you need to 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 ``plugins/Simple/Simple.td``, which is a primitive -wrapper for ``gcc``:: +Start by compiling ``example/Simple``, which is a primitive wrapper for +``gcc``:: $ cd $LLVM_DIR/tools/llvmc - $ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple + $ cp -r example/Simple plugins/Simple + + # NB: A less verbose way to compile standalone LLVMC-based drivers is + # described in the reference manual. + + $ make LLVMC_BASED_DRIVER_NAME=mygcc LLVMC_BUILTIN_PLUGINS=Simple $ cat > hello.c [...] $ mygcc hello.c $ ./hello.out Hello -Here we link our plugin with the LLVMC core statically to form an -executable file called ``mygcc``. It is also possible to build our -plugin as a standalone dynamic library; this is described in the -reference manual. +Here we link our plugin with the LLVMC core statically to form an executable +file called ``mygcc``. It is also possible to build our plugin as a dynamic +library to be loaded by the ``llvmc`` executable (or any other LLVMC-based +standalone driver); this is described in the reference manual. Contents of the file ``Simple.td`` look like this:: |
