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

Zvonimir Rakamaric zvonimir at cs.utah.edu
Fri May 23 09:06:10 PDT 2014


Not really...

My question is a follow-up on this:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/072986.html

I figured out how to turn off coercion by hacking into clang and
adding one line that selects DefaultTargetCodeGenInfo (which does not
do coercion) by default. Now, this is a hacky solution that requires
distributing this weird patch for clang with my tool (SMACK verifier).

So I wonder if the same thing could somehow be achieved through
command line. I tried something like:
clang --target=unknown-unknown-linux-gnu simple.c
but that throws an error.

Thanks!


--
http://zvonimir.info
http://soarlab.org/


On Fri, May 23, 2014 at 2:13 AM, Jonathan Roelofs
<jonathan at codesourcery.com> wrote:
> This might be me answering the question you're trying to ask, but not the
> one you're specifically asking.... does '-S -emit-llvm' do what you want to
> do?
>
> Jon
>
>
> On 5/22/14, 6:12 PM, Zvonimir Rakamaric wrote:
>>
>> 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
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded
>



More information about the cfe-dev mailing list