What's the state of Ada's LLVM compiler?

I’ve seen some discussion about LLVM support for Ada. It seems to be a work in progress. How far along is the compiler? Is it at a usable state?

My outdated opinition: It is usable for experiments, but not for a production IMHO.

On the telegram chat Arno wrote this:

GNAT LLVM Pro is stable enough for industrial usage.

2 Likes

I talked to some people with knowledge about it, and there is an LLVM compiler being worked on.

I compiled it last night using my system llvm-14 rather than building llvm again. It now builds an RTS.

GNAT-LLVM is currently used in AdaCore’s CCG tool (translation from Ada to C) and the upcoming GNAT for Cuda.

3 Likes

I last worked on it in March, blog here.

I’ve been meaning to get ACATS to cooperate - the problem is first that the tools are prefixed, e.g. llvm-gnatmake, and then that you really need gprbuild, which the ACATS scripts don’t use.

I should add that I like messing with tools for the fun of it :slight_smile:

1 Like

Shouldn’t gprbuild just use whatever it finds? a la share/gprconfig/gnat.xml

ISTR you have to say --target=llvm or similar, or gprconfig
doesn’t see the compiler

It would be a gem to have the LLVM Ada compiler on macOS, imho, in a fairly good state

I’m a bit tired at the moment, but could consider this after a week’s rest :slight_smile:

Find GCC 12.2.0 & tools for Intel silicon (will run on Apple silicon
under Rosetta) at
Release GCC 12.2.0 (x86_64) · simonjwright/distributing-gcc · GitHub

Built on High Sierra with Python 3.9 (because Apple have withdrawn 2.7
in Monterey).

Also, the same for Apple silicon, built on Ventura but I’ve done my best
to make sure it’ll run on Monterey, at
Release GCC 12.2.0 (aarch64) · simonjwright/distributing-gcc · GitHub

I’ve marked both as pre-release, but I’m specially interested (if anyone
has some time on their hands) in a check of the aarch64 version on
Monterey.

I see I last built llvm-gnat & friends in August this year (over Homebrew’s LLVM 16). I don’t know whether the fact it’s missing the symbol _LLVMAddInstructionCombiningPass this morning is because HB has updated to LLVM 17 or because I’ve been messing with the CommandLineTools … I suspect the former, which is somewhat discouraging

Can’t downgrade Homebrew’s LLVM to 16.

Downloaded the last binary of 16 from llvm.org: won’t compile gnat-llvm because of some missing header. The call was inside an #ifdef to check whether the header was available.

Life’s too short; I’ve deleted the release.