[llvm-dev] Automake Assembler Assumptions with LLVM-MC
John Reagan via llvm-dev
llvm-dev at lists.llvm.org
Thu May 19 11:36:09 PDT 2016
> From: Tom Stellard [mailto:tom at stellard.net]
> Sent: Thursday, May 19, 2016 1:56 PM
> On Thu, May 19, 2016 at 09:33:39AM -0400, John Reagan via llvm-dev
> > On Wed, May 18, 2016 at 01:10:50PM +0000, Daniel Sanders via llvm-dev
> > > It's my understanding that llvm-mc is intended to be a testing tool
> > > for LLVM developers rather than an assembler for end users. Users
> > > should be assembling with clang.
> > Not all LLVM users are clang users. For example, we're using LLVM to
> > build OpenVMS cross-compilers to x86 for our porting effort. We have
> > our own set of frontends. We're using llvm-mc as our assembler for
> > the lower level OS code.
> Maybe I'm missing something here, but it seems like if you can run
> llvm-mc you should also be able to run clang with the -x assembler
> flag. Is the problem that you are unable to install clang on your dev
> system for some reason?
We haven't attempted to build clang yet as it isn't needed for our OS
bootstrap. In addition, given the somewhat stale C++ compiler we're using
OpenVMS Itanium (EDG/Intel-based), we're using LLVM 3.4.2 since it doesn't
use C++11 syntax in source code.
Even then, I had to make some changes to the LLVM source code to
get it past my C++ compiler (it has bugs with no hope of fixes).
I suspect I'll have to do the same in the clang 3.4.2 tree.
I just didn't bother with that yet.
I won't need clang until we have a working version of OpenVMS x86
so I can then bootstrap my way to something newer. Once running
natively, we'll use clang to build things going forward.
The OS team needs a cross-assembler. So I could spend my time to get
and gas working (it has an OpenVMS target so it isn't that complicated) or I
can just use the llvm-mc that builds with the rest of the LLVM tools. It
may not be the long-term solution once we get clang on the native systems.
Yes, the downside to the model is that there is no pre-processor that is
automatically run over the source (either using llvm-mc or gas) so that is
often run manually by the build system. That's what the OS team prefers
at the moment.
More information about the llvm-dev