From 91f935e75147d70185b3443a47718b3f6a812059 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 8 Jul 2009 11:13:34 +0000 Subject: Update the example to show that an archive can contain llvm bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75000 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/GoldPlugin.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/GoldPlugin.html') diff --git a/docs/GoldPlugin.html b/docs/GoldPlugin.html index b5148ab331..77a417f571 100644 --- a/docs/GoldPlugin.html +++ b/docs/GoldPlugin.html @@ -127,8 +127,9 @@ void foo4(void) { --- command lines --- $ llvm-gcc -flto a.c -c -o a.o # <-- a.o is LLVM bitcode file +$ ar q a.a a.o # <-- a.a is an archive with LLVM bitcode $ llvm-gcc b.c -c -o b.o # <-- b.o is native object file -$ llvm-gcc -use-gold-plugin a.o b.o -o main # <-- link with LLVMgold plugin +$ llvm-gcc -use-gold-plugin a.a b.o -o main # <-- link with LLVMgold plugin

Gold informs the plugin that foo3 is never referenced outside the IR, leading LLVM to delete that function. However, unlike in the -- cgit v1.2.3