32 bit architecture build

Hello

I want to build 32 bit architecture llvm from source (llvm-3.9). But I do not know how to do it. Could somebody please guide me with this.

When I run commands from following link - http://llvm.org/docs/CMake.html
I get 64 bit architecture llvm.

  1. Which commands should I run to get 32 bit architecture?
  2. Are there any dependencies also which I need to compile for 32 bit architecture?

Regards

Give -DLLVM_BUILD_32_BITS=ON to cmake, assuming you are using x86-64.
Then, make sure you have i686 version of toolchain and libraries.
( g++ -m32 sample.cc ; works)

See also; http://bb.pgr.jp/builders/llvm-i686-linux-RA/builds/2008

Thanks, Takumi

during cmake configuration : -DLLVM_BUILD_32_BITS=ON