[odb-users] Thoughts about GCC as front end for the ODB Compiler

Boris Kolpackov boris at codesynthesis.com
Mon Jan 21 08:03:24 EST 2013

Hi Davide,

Davide Anastasia <Davide.Anastasia at qualitycapital.com> writes:

> I was wondering whether Clang++/LLVM frontend could be used in place
> of GCC as frontend for the ODB compiler.

Theoretically, yes. However, this will most likely involve a non-trivial
amount of work.

> Would that make the ODB compiler simpler to compile/extend?

I don't think it will make any difference extensibility-wise. As for
building the ODB compiler, I think it will make it more difficult,
not easier.

On fairly recent GNU/Linux distributions building the ODB compiler
is actually a fairly easy process: (1) install plugin headers from
the distribution's repository, (2) build libcutl, and (3) build odb.

In contrast, last time I checked, at least on Debian, Clang headers
and libraries weren't packaged. So you would need to build CLang
from source.

On Windows it may be easier to build the ODB compiler itself with
Clang (if we supported it, that is). However, the whole toolchain
(e.g., the standard libraries, system headers, etc.) for Clang on
Windows is a lot less mature than that of GCC (MinGW). So while
building the ODB compiler itself might be easier, getting the whole
thing to work properly might actually be a lot harder.


More information about the odb-users mailing list