[llvm] r274811 - Fix LTO document

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 17:28:29 PDT 2016


Author: prazek
Date: Thu Jul  7 19:28:29 2016
New Revision: 274811

URL: http://llvm.org/viewvc/llvm-project?rev=274811&view=rev
Log:
Fix LTO document

Summary: fixed very old document

Reviewers: tejohnson, pcc

Subscribers: mehdi_amini, eraman, llvm-commits

Differential Revision: http://reviews.llvm.org/D22121

Modified:
    llvm/trunk/docs/LinkTimeOptimization.rst

Modified: llvm/trunk/docs/LinkTimeOptimization.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LinkTimeOptimization.rst?rev=274811&r1=274810&r2=274811&view=diff
==============================================================================
--- llvm/trunk/docs/LinkTimeOptimization.rst (original)
+++ llvm/trunk/docs/LinkTimeOptimization.rst Thu Jul  7 19:28:29 2016
@@ -87,9 +87,9 @@ To compile, run:
 
 .. code-block:: console
 
-  % clang -emit-llvm -c a.c -o a.o   # <-- a.o is LLVM bitcode file
+  % clang -flto -c a.c -o a.o        # <-- a.o is LLVM bitcode file
   % clang -c main.c -o main.o        # <-- main.o is native object file
-  % clang a.o main.o -o main         # <-- standard link command without modifications
+  % clang -flto a.o main.o -o main   # <-- standard link command with -flto
 
 * In this example, the linker recognizes that ``foo2()`` is an externally
   visible symbol defined in LLVM bitcode file. The linker completes its usual




More information about the llvm-commits mailing list