Moritz Angermann via llvm-dev
2017-Mar-10 14:31 UTC
[llvm-dev] Distributing llc and opt with own package?
Hi, I was wondering, if someone could point me into the right direction, towards building just llc and opt (potentially 4.0 + patches) to distribute them in the interim with compiler? The idea is that we’d like to pin our llvm ir code generator to a specific set of llc and opt tools, with potential patches applied, until we manage to get all those patches upstreamed. I’d like to find answers to the following question: - How trivially can I build just llc and opt into (maybe static?) distributable binaries? - Would generating them for multiple architectures pose any specific complications? Cheers, Moritz
Jonathan Roelofs via llvm-dev
2017-Mar-10 17:11 UTC
[llvm-dev] Distributing llc and opt with own package?
On 3/10/17 7:31 AM, Moritz Angermann via llvm-dev wrote:> Hi, > > I was wondering, if someone could point me into the right direction, > towards building just llc and opt (potentially 4.0 + patches) to distribute > them in the interim with compiler? The idea is that we’d like to pin our > llvm ir code generator to a specific set of llc and opt tools, with > potential patches applied, until we manage to get all those patches > upstreamed. > > I’d like to find answers to the following question: > - How trivially can I build just llc and opt into (maybe static?) > distributable binaries?$ cmake path/to/llvm -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-static-libstdc++ $ make llc opt> - Would generating them for multiple architectures pose any specific > complications?Targets or hosts? Jon> > Cheers, > Moritz > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
Matthias Braun via llvm-dev
2017-Mar-10 18:26 UTC
[llvm-dev] Distributing llc and opt with own package?
Just a word of warning: llc and opt are primarily developed as debugging tools to support LLVM testing. They are not intended to be shipped or used as code generators for frontends. They do often work in these settings but you may hit rough edges that nobody will care to fix and the behavior or commandline interface may change every release... A more stable alternative is usually to feed .ir/.bc files to clang or better link to the llvm libraries and generate the code from there. - Matthias> On Mar 10, 2017, at 6:31 AM, Moritz Angermann via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > > I was wondering, if someone could point me into the right direction, > towards building just llc and opt (potentially 4.0 + patches) to distribute > them in the interim with compiler? The idea is that we’d like to pin our > llvm ir code generator to a specific set of llc and opt tools, with > potential patches applied, until we manage to get all those patches > upstreamed. > > I’d like to find answers to the following question: > - How trivially can I build just llc and opt into (maybe static?) > distributable binaries? > - Would generating them for multiple architectures pose any specific > complications? > > Cheers, > Moritz > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Moritz Angermann via llvm-dev
2017-Mar-11 01:58 UTC
[llvm-dev] Distributing llc and opt with own package?
Hi Matthias, I’ll heed your advice and try to replace our llc and opt invocations with clang. Thank you Jonathan, I’ll try to build clang in a static fashion as you described and try to see how we can bundle that sensibly with ghc. Hopefully, once our upstream patches made it into ghc, (e.g. D30770, and D30812 as of right now), we’ll be able to drop shipping a custom static clang with ghc, and can rely on the one provided by the system. Cheers, Moritz> On Mar 11, 2017, at 2:26 AM, Matthias Braun <mbraun at apple.com> wrote: > > Just a word of warning: > > llc and opt are primarily developed as debugging tools to support LLVM testing. They are not intended to be shipped or used as code generators for frontends. They do often work in these settings but you may hit rough edges that nobody will care to fix and the behavior or commandline interface may change every release... A more stable alternative is usually to feed .ir/.bc files to clang or better link to the llvm libraries and generate the code from there. > > - Matthias > >> On Mar 10, 2017, at 6:31 AM, Moritz Angermann via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> I was wondering, if someone could point me into the right direction, >> towards building just llc and opt (potentially 4.0 + patches) to distribute >> them in the interim with compiler? The idea is that we’d like to pin our >> llvm ir code generator to a specific set of llc and opt tools, with >> potential patches applied, until we manage to get all those patches >> upstreamed. >> >> I’d like to find answers to the following question: >> - How trivially can I build just llc and opt into (maybe static?) >> distributable binaries? >> - Would generating them for multiple architectures pose any specific >> complications? >> >> Cheers, >> Moritz >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Moritz Angermann via llvm-dev
2017-Mar-11 07:50 UTC
[llvm-dev] Distributing llc and opt with own package?
Hi Matthias, I’m trying to see if I can make do with the clang interface only. How do I pass flags to opt or llc? Say I want to enable/disable tbaa, which could be done with `--enable-tbaa=true/false` or `-mem2reg` or `-globalopt`? Would the `-llvm` switch be, what I’m looking for or the `-Xclang`, or something else entirely? Cheers, Moritz> On Mar 11, 2017, at 2:26 AM, Matthias Braun <mbraun at apple.com> wrote: > > Just a word of warning: > > llc and opt are primarily developed as debugging tools to support LLVM testing. They are not intended to be shipped or used as code generators for frontends. They do often work in these settings but you may hit rough edges that nobody will care to fix and the behavior or commandline interface may change every release... A more stable alternative is usually to feed .ir/.bc files to clang or better link to the llvm libraries and generate the code from there. > > - Matthias > >> On Mar 10, 2017, at 6:31 AM, Moritz Angermann via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> I was wondering, if someone could point me into the right direction, >> towards building just llc and opt (potentially 4.0 + patches) to distribute >> them in the interim with compiler? The idea is that we’d like to pin our >> llvm ir code generator to a specific set of llc and opt tools, with >> potential patches applied, until we manage to get all those patches >> upstreamed. >> >> I’d like to find answers to the following question: >> - How trivially can I build just llc and opt into (maybe static?) >> distributable binaries? >> - Would generating them for multiple architectures pose any specific >> complications? >> >> Cheers, >> Moritz >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >