[cfe-dev] Is it possible to select UnknownArch through command line in clang?

Zvonimir Rakamaric zvonimir at cs.utah.edu
Thu May 22 18:12:45 PDT 2014


Hi all,

Quick background story: I would like to select
DefaultTargetCodeGenInfo when generating LLVM IR for a project of
mine. And as far as I could figure out, that could be accomplished by
selecting UnknownArch as the target architecture.

What I could not figure out was how to set UnknownArch from the
command line using --target or something like that.

Invoking clang like this:
clang --target=x86_64-unknown-linux-gnu simple.c
is fine.

But for this:
clang --target=unknown-unknown-linux-gnu simple.c

I get an error:
error: unknown target triple 'unknown-unknown-linux-gnu', please use
-triple or -arch

It would really be awesome if UnknownArch could somehow be selected
from the command line. Is that possible? Am I missing something?

Thanks!
-- Zvonimir



More information about the cfe-dev mailing list