Tarun Prabhu via llvm-dev
2016-May-13 17:56 UTC
[llvm-dev] Creating and using "shared library" of LLVM IR
> > Any reason you're not using static archives? It seems to correspond more > to what you're trying to do (i.e. LTO all the code in a single binary). >I just want to avoid modifying the application's build system. If there's no other way, I could go in and change the build scripts, but I'd like to avoid doing that as much as possible. Tarun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160513/794bbebb/attachment.html>
Mehdi Amini via llvm-dev
2016-May-13 18:00 UTC
[llvm-dev] Creating and using "shared library" of LLVM IR
> On May 13, 2016, at 10:56 AM, Tarun Prabhu <tarunprabhu at gmail.com> wrote: > > Any reason you're not using static archives? It seems to correspond more to what you're trying to do (i.e. LTO all the code in a single binary). > > I just want to avoid modifying the application's build system. If there's no other way, I could go in and change the build scripts, but I'd like to avoid doing that as much as possible.If you're doing LTO with shared library, usually you're still producing shared library that are not bitcode (i.e. the LTO is performed separately within the boundary of each library). Other people may have different experience, CC Rafael maybe? -- Mehdi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160513/91854d03/attachment.html>
Tarun Prabhu via llvm-dev
2016-May-13 18:06 UTC
[llvm-dev] Creating and using "shared library" of LLVM IR
I am primarily interested in running an analysis pass on the entire code, and I can't quite do it separately for each library and then combine the results which is why I need the whole program. For the moment, it isn't strictly necessary to produce the exact same output at the end of the process as you would produce with a regular compiler. Tarun On Fri, May 13, 2016 at 1:00 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:> > On May 13, 2016, at 10:56 AM, Tarun Prabhu <tarunprabhu at gmail.com> wrote: > > Any reason you're not using static archives? It seems to correspond more >> to what you're trying to do (i.e. LTO all the code in a single binary). >> > > I just want to avoid modifying the application's build system. If there's > no other way, I could go in and change the build scripts, but I'd like to > avoid doing that as much as possible. > > > If you're doing LTO with shared library, usually you're still producing > shared library that are not bitcode (i.e. the LTO is performed separately > within the boundary of each library). > > Other people may have different experience, CC Rafael maybe? > > -- > Mehdi > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160513/df110187/attachment-0001.html>
Rafael EspĂndola via llvm-dev
2016-May-13 18:27 UTC
[llvm-dev] Creating and using "shared library" of LLVM IR
> I just want to avoid modifying the application's build system. If there's no > other way, I could go in and change the build scripts, but I'd like to avoid > doing that as much as possible. > > > If you're doing LTO with shared library, usually you're still producing > shared library that are not bitcode (i.e. the LTO is performed separately > within the boundary of each library).Correct. If you want code to be linked in the binary (lto or not) you need to replace the shared library with a static one. Cheers, Rafael