From: Mikhail Glushenkov Date: Wed, 17 Jun 2009 02:56:48 +0000 (+0000) Subject: Regenerate. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=63dc3180859023e091cb2524a905034a74f51ffb;p=oota-llvm.git Regenerate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73597 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/CompilerDriver.html b/docs/CompilerDriver.html index f4391ad92d8..f498e295349 100644 --- a/docs/CompilerDriver.html +++ b/docs/CompilerDriver.html @@ -57,7 +57,7 @@ abstract graph. The structure of this graph is completely determined by plugins, which can be either statically or dynamically linked. This makes it possible to easily adapt LLVMC for other purposes - for 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.

@@ -71,12 +71,12 @@ $ llvmc -O3 -Wall hello.cpp $ ./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 -extensions). 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 +ending 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
@@ -158,13 +158,13 @@ $ mv Simple.td MyPlugin.td
 

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, -LLVMCMyPlugin.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/LLVMCSimple.so
+$ llvmc -load $LLVM_DIR/Release/lib/plugin_llvmc_Simple.so
 
@@ -197,7 +197,7 @@ $ make $ 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 built-in plugins. It can be compiled with the following command:

diff --git a/docs/CompilerDriverTutorial.html b/docs/CompilerDriverTutorial.html index 897f9a9f895..317b1d12712 100644 --- a/docs/CompilerDriverTutorial.html +++ b/docs/CompilerDriverTutorial.html @@ -48,12 +48,13 @@ command-line LLVMC usage, refer to the

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.

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.