s/pretty much/definitely/ Even then, “works” is too strong a word. Caveat emptor and all that.> On Jul 23, 2015, at 1:20 PM, Eric Christopher <echristo at gmail.com> wrote: > > > > On Thu, Jul 23, 2015 at 10:31 AM Débora Setton Sanches <setton.debora at gmail.com <mailto:setton.debora at gmail.com>> wrote: > Hi, > > Is it normal/expected for `llc` to support a different set of targets > than `lli`? > I have a hello.ll on which this works: > > $ llc -mtriple=armv7a-linux-gnueabihf hello.ll > # OK, generates hello.s > > But this doesn't: > > $ lli -mtriple=armv7a-linux-gnueabihf hello.ll > # lli: error creating EE: No available targets are compatible with > this triple, see -version for the available targets. > > I'm using LLVM from the git mirror: > > $ lli -version > LLVM (http://llvm.org/ <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=u4_u6UfvGk27P9ktRFVrbnN5w6x_4XFkjdv-R90mfkM&s=S3BhSstRK0rNlNL1DaFmvkVutrhLzsIGTwv4Mkc2OvA&e=>): > LLVM version 3.7.0svn > Optimized build. > Built Jun 19 2015 (17:35:44). > Default target: x86_64-unknown-linux-gnu > Host CPU: broadwell > > I thought they would both support the same targets... Why isn't that the case? > > > It's not a simulator, it pretty much only works on the host. > > -eric > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150723/dfc23a47/attachment.html>
Débora Setton Sanches
2015-Jul-24 12:26 UTC
[LLVMdev] lli supports different targets than llc?
But I am running it on the host, as a kind of intermediate step in the cross-compilation, just to check if everything still works after the frontend step. Shouldn't it work then? I don't know much about how everything works yet, sorry if it's a silly question. What I thought was also weird is that the exact same example works if I use the OpenMP/Clang fork (https://clang-omp.github.io/), which I assumed would support, if anything, *less* targets, since it's a little behind (LLVM 3.5). -- Débora. On Thu, Jul 23, 2015 at 5:40 PM, Jim Grosbach <grosbach at apple.com> wrote:> s/pretty much/definitely/ > > Even then, “works” is too strong a word. Caveat emptor and all that. > > On Jul 23, 2015, at 1:20 PM, Eric Christopher <echristo at gmail.com> wrote: > > > > On Thu, Jul 23, 2015 at 10:31 AM Débora Setton Sanches < > setton.debora at gmail.com> wrote: > >> Hi, >> >> Is it normal/expected for `llc` to support a different set of targets >> than `lli`? >> I have a hello.ll on which this works: >> >> $ llc -mtriple=armv7a-linux-gnueabihf hello.ll >> # OK, generates hello.s >> >> But this doesn't: >> >> $ lli -mtriple=armv7a-linux-gnueabihf hello.ll >> # lli: error creating EE: No available targets are compatible with >> this triple, see -version for the available targets. >> >> I'm using LLVM from the git mirror: >> >> $ lli -version >> LLVM (http://llvm.org/ >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=u4_u6UfvGk27P9ktRFVrbnN5w6x_4XFkjdv-R90mfkM&s=S3BhSstRK0rNlNL1DaFmvkVutrhLzsIGTwv4Mkc2OvA&e=> >> ): >> LLVM version 3.7.0svn >> Optimized build. >> Built Jun 19 2015 (17:35:44). >> Default target: x86_64-unknown-linux-gnu >> Host CPU: broadwell >> >> I thought they would both support the same targets... Why isn't that the >> case? >> >> > It's not a simulator, it pretty much only works on the host. > > -eric > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150724/e093bb53/attachment.html>
On 24 July 2015 at 13:26, Débora Setton Sanches <setton.debora at gmail.com> wrote:> But I am running it on the host, as a kind of intermediate step in the > cross-compilation, just to check if everything still works after the > frontend step. Shouldn't it work then?If the IR was platform independent, and you could run the IR on any platform, then this could work. But it isn't. Your best bet is to use llc + ld + qemu user emulation. You'll also need multiarch support for the libraries, tools, etc. cheers, --renato