<html>
  <head>

  </head>
  <body>
    <p style="margin-top: 0; margin-bottom: 0">
      <font size="2" face="Dialog">any news?thanks</font><br><br>>>> "Guan Jun He" <gjhe@novell.com> 10/30/2009 2:22 PM >>><br>    </p>
    <p style="margin-top: 0; margin-bottom: 0">
      --emit-llvm<font face="Dialog" size="2">, if not conflict</font><br><br>>>> Paul Davey <plmdvy@gmail.com> 10/30/2009 11:11 AM >>><br>--emit-llvm??<br><br>    </p>
    <div class="gmail_quote">
      <p style="margin-top: 0; margin-bottom: 0">
        On Fri, Oct 30, 2009 at 7:55 AM, Viktor Kutuzov <span dir="ltr"><<a href="mailto:vkutuzov@accesssoftek.com">vkutuzov@accesssoftek.com</a>></span> wrote:<br>      </p>
      <blockquote style="margin-right: 0; margin-top: 0; border-left: 1px #ccc solid; padding-left: 0; margin-left: 0; margin-bottom: 0" class="gmail_quote">
        <p style="margin-top: 0; margin-bottom: 0">
          Hello everyone,<br><br>I'm working on passing parameters for gold/LTO plug-in and could add this one as well.<br>Just need an option name. Could anybody suggest one?<br><font color="#888888"><br style="color: #888888">Viktor<br style="color: #888888"></font>        </p>
        <div>
          <div>
            <p style="margin-top: 0; margin-bottom: 0">
              <br>
                          </p>
          </div>
          <div class="h5">
            <p style="margin-top: 0; margin-bottom: 0">
              <br>
              ----- Original Message -----<br>From: "Nick Lewycky" <<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>><br>To: "Daniel Dunbar" <<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>><br>Cc: "Kelly, Terence P (HP Labs Researcher)" <<a href="mailto:terence.p.kelly@hp.com">terence.p.kelly@hp.com</a>>; <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>Sent: Thursday, October 15, 2009 8:38 PM<br>Subject: Re: [LLVMdev] strace for whole-program bitcodes<br><br><br>Daniel Dunbar wrote:<br>> On Thu, Oct 15, 2009 at 7:14 AM, Timo Juhani Lindfors<br>> <<a href="mailto:timo.lindfors@iki.fi">timo.lindfors@iki.fi</a>> wrote:<br>>> Tianwei <<a href="mailto:tianwei.sheng@gmail.com">tianwei.sheng@gmail.com</a>> writes:<br>>>> someone suggested me to use gold-plugin, I know nothing about it yet, I will<br>>>> have a try later. Does anyone have a good solution for this problem?<br>>> Afaik gold does not help here. I tried it and managed to only generate<br>>> native code.<br>><br>> "Just" gold isn't quite good enough, because at the last final link<br>> steps gold will still generate native code. However, it should be<br>> possible to find a way to get gold to leave the merged bitcode around<br>> somewhere, or perhaps do something like llvm-ld. Nicholas?<br><br>It's easy. In gold-plugin.cpp all_symbols_read_hook() where<br>lto_codegen_compile(cg, ...) is currently called, call<br>lto_codegen_write_merged_modules(cg, "/path/to/output.bc") instead.<br><br>If someone were to rig this up to a command-line flag (search for<br>LDPT_OPTION in the same file) then I would like to commit that change.<br><br>Nick<br><br>> The advantage of this approach is that it will potentially work with<br>> build systems that call ar/ld directly.<br>><br>>> I'm currently investigating an alternative approach to produce<br>>> whole-program bitcodes:<br>>><br>>> 1) add /tmp/wrap to PATH<br>>> 2) create /tmp/wrap/gcc with the following contents<br>>><br>>> #!/bin/sh<br>>> exec llvm-gcc -specs /tmp/wrap/gcc.specs "$@"<br>>><br>>> 3) llvm-gcc -dumpspecs > /tmp/wrap/gcc.specs<br>>> 4) modify /tmp/wrap/gcc.specs so that it always passes -emit-llvm to cc1<br>>> 5) modify /tmp/wrap/gcc.specs so that it calls llvm-ld* instead of real<br>>> ld and does not pass any unknown flags to it.<br>>><br>>> With this approach I was able to compile and run airstrike (a 2d<br>>> dogfighting game) in bitcode form very transparently with:<br>>><br>>> $ make-bitcode fakeroot apt-get --build source airstrike<br>>> $ sudo dpkg -i airstrike*.deb<br>>> $ airstrike<br>><br>> Very clever though. :)<br>><br>> - Daniel<br>><br>>> If you are interested I can try to rework my scripts to a shape where<br>>> they could be used by somebody else.<br>>><br>>> (*) I am not actually calling llvm-ld directly. Instead I have an<br>>> "llvm-ld-exe" wrapper that calls llvm-ld and then uses "anytoexe" to<br>>> pack the resulting bitcode to a shell script that can execute itself with<br>>> lli and use the correct -load options.<br>>> _______________________________________________<br>>> LLVM Developers mailing list<br>>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a target="_blank" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>>> <a target="_blank" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>>><br>><br><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a target="_blank" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a target="_blank" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a target="_blank" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a target="_blank" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>            </p>
          </div>
        </div>
      </blockquote>
    </div>
    <p style="margin-top: 0; margin-bottom: 0">
      <br>
    </p>
  </body>
</html>