From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.13.196.66 with SMTP id g63mr7306428ywd.140.1477140695439; Sat, 22 Oct 2016 05:51:35 -0700 (PDT) X-Received: by 10.157.0.40 with SMTP id 37mr834258ota.16.1477140695398; Sat, 22 Oct 2016 05:51:35 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g45no1433982qte.1!news-out.google.com!w143ni1507itb.0!nntp.google.com!e187no1756879itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 22 Oct 2016 05:51:34 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:c7d:3cda:7600:932b:b705:6315:5a80; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3cda:7600:932b:b705:6315:5a80 References: <7eaadf74-c55f-4c00-8f13-bf027cce130e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6188b81f-7d6a-4ea4-90d4-74142471d979@googlegroups.com> Subject: Re: LLVM and Ada From: Lucretia Injection-Date: Sat, 22 Oct 2016 12:51:35 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2654 X-Received-Body-CRC: 2620056277 Xref: news.eternal-september.org comp.lang.ada:32162 Date: 2016-10-22T05:51:34-07:00 List-Id: On Friday, 21 October 2016 09:32:04 UTC+1, vincent....@gmail.com wrote: > My question precisely was not about the Ada frontend in fact but about a = binding to use the LLVM from an Ada program that is a sort of compiler. I t= hink that those who ported GNAT to LLVM=C2=A0should have created this kind = of binding, no ? I have looked into this and there are reasons: 1) C++ is hard to bind to, you either have to wrap the classes in C and fla= tten the api or use GNAT's class binding representation clauses - which isn= 't portable to other compilers - this may or may not matter to you. 2) There is a C binding in LLVM's source, but according to their own docs (= that I cannot find right now!) say that the C interface isn't as complete a= s the C++ one. 3) The API changes a lot, which means it's harder to bind to. I would look at which API you intend to bind to first to see if it can do w= hat you need, then start by generating the bindings with "gcc -fdump-ada-sp= ec-slim" and then hand massage them, GCC generates a ton of crap and they'r= e not readable or compilable. Whatever binding you create, don't release them under GPL, pick something l= ess restrictive and other's will use them. Really annoys me when people cre= ate a binding to something and then puts them under a license the original = library wasn't released under.