[cfe-users] Problem compiling simple main.c with llvm-5.0
Don Hinton via cfe-users
cfe-users at lists.llvm.org
Thu Dec 28 11:31:48 PST 2017
Looks like AVR is experimental, so you'll need to pass it via
As for the correct --target, you can take a look at the logic in
llvm/cmake/config.guess to get an idea on how to construct one.
On Wed, Dec 13, 2017 at 2:15 AM, via cfe-users <cfe-users at lists.llvm.org>
> Hi, I am new to llvm, so my first question is if this is the right
> mailing list to address respective problems using that software.
> I downloaded the llvm 5.0.0 binary bundle, and I can compile simple
> main.c for x64_64 host. However, when
> .../bin/clang main.c --target=avr
> error: unable to create target: 'No available targets are compatible with
> this triple.'
> 1 error generated.
> As --help is not much help, I tried guessing around using targets
> elf32-avr, avr-unknown-none, all giving the same, unspecific diagnostic
> (so much for "extremely useful error and warning messages").
> > On the other hand, Clang/LLVM is natively a cross-compiler, meaning
> > that one set of programs can compile to all targets by setting the
> > -target option.
> I checked the v5.0 sources, there are plenty of modules dealing with
> AVR, so that target should be supported. No?
> So I downloaded the llvm 5.0.0 source bundle and configured for AVR:
> $ cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="AVR"
> -- Constructing LLVMBuild project information
> CMake Error at CMakeLists.txt:688 (message):
> The target `AVR' does not exist.
> It should be one of
> -- Configuring incomplete, errors occurred!
> See also ".../build/llvm-5-avr/CMakeFiles/CMakeOutput.log".
> See also ".../build/llvm-5-avr/CMakeFiles/CMakeError.log".
> The 5.0.0 release notes have some mention of AVR
> so I'd expect this target is supported?
> Thanks for any help.
> cfe-users mailing list
> cfe-users at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-users