How to generate 32 Bit executable ?

Hello,

I have a very simple input llvm IR file. I wanted to generate a 32-BIT a.out executable from this, but, couldn’t make it. By default it is 64 BIT.
Is there any way to dictate it from the input LLVM file or I am missing anything.

The command I used : clang test.ll

I tried playing with “target datalayout” but no success yet.

Thanks.

Try to generate the .ll file using clang's -m32 flag