Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
fbd815fb
Commit
fbd815fb
authored
15 years ago
by
Mikhail Glushenkov
Browse files
Options
Downloads
Patches
Plain Diff
Another small documentation update.
llvm-svn: 73596
parent
4ced3324
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/tools/llvmc/doc/LLVMC-Reference.rst
+11
-11
11 additions, 11 deletions
llvm/tools/llvmc/doc/LLVMC-Reference.rst
llvm/tools/llvmc/doc/LLVMC-Tutorial.rst
+2
-1
2 additions, 1 deletion
llvm/tools/llvmc/doc/LLVMC-Tutorial.rst
with
13 additions
and
12 deletions
llvm/tools/llvmc/doc/LLVMC-Reference.rst
+
11
−
11
View file @
fbd815fb
...
...
@@ -33,7 +33,7 @@ example, as a build tool for game resources.
Because LLVMC employs TableGen_ as its configuration language, you
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
...
...
@@ -48,12 +48,12 @@ you shouldn't be able to notice them::
$ ./a.out
hello
One nice feature of LLVMC is that one doesn't have to distinguish
between
different compilers for different languages (think ``g++``
and
``gcc``) - the
right toolchain is chosen automatically based on input
language names (which
are, in turn, determined from file
e
xtensions). If you want to force files ending with ".c" to compile as
C++, use the ``-x`` option, just like you would
do it with ``gcc``::
One nice feature of LLVMC is that one doesn't have to distinguish
between
different compilers for different languages (think ``g++``
vs. ``gcc``) - the
right toolchain is chosen automatically based on input
language names (which
are, in turn, determined from file
extensions). If you want to force files
e
nding with ".c" to compile as C++, use the ``-x`` option, just like you would
do it with ``gcc``::
$ # hello.c is really a C++ file
$ llvmc -x c++ hello.c
...
...
@@ -148,13 +148,13 @@ generic::
To build your plugin as a dynamic library, just ``cd`` to its source
directory and run ``make``. The resulting file will be called
``
LLVMC
$(LLVMC_PLUGIN).$(DLL_EXTENSION)`` (in our case,
``
LLVMC
MyPlugin.so``). This library can be then loaded in with the
``
plugin_llvmc_
$(LLVMC_PLUGIN).$(DLL_EXTENSION)`` (in our case,
``
plugin_llvmc_
MyPlugin.so``). This library can be then loaded in with the
``-load`` option. Example::
$ cd $LLVMC_DIR/plugins/Simple
$ make
$ llvmc -load $LLVM_DIR/Release/lib/
LLVMC
Simple.so
$ llvmc -load $LLVM_DIR/Release/lib/
plugin_llvmc_
Simple.so
Compiling standalone LLVMC-based drivers
========================================
...
...
@@ -187,7 +187,7 @@ Another way to do the same thing is by using the following command::
$ cd $LLVMC_DIR
$ make LLVMC_BUILTIN_PLUGINS=MyPlugin LLVMC_BASED_DRIVER_NAME=mydriver
This works with both srcdir==objdir and srcdir != objdir, but assumes that the
This works with both srcdir
==
objdir and srcdir != objdir, but assumes that the
plugin source directory was placed under ``$LLVMC_DIR/plugins``.
Sometimes, you will want a 'bare-bones' version of LLVMC that has no
...
...
This diff is collapsed.
Click to expand it.
llvm/tools/llvmc/doc/LLVMC-Tutorial.rst
+
2
−
1
View file @
fbd815fb
...
...
@@ -46,12 +46,13 @@ 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 ``example/Simple``, which is a primitive wrapper for
``gcc``::
$ cd $LLVM_DIR/tools/llvmc
$ cp -r example/Simple plugins/Simple
# NB: A less verbose way to compile standalone LLVMC-based drivers is
# described in the reference manual.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment