1 .. _how_to_build_on_arm:
3 ===================================================================
5 ===================================================================
10 This document contains information about building/testing LLVM and
13 Notes On Building LLVM/Clang on ARM
14 =====================================
15 Here are some notes on building/testing LLVM/Clang on ARM. Note that
16 ARM encompasses a wide variety of CPUs; this advice is primarily based
17 on the ARMv6 and ARMv7 architectures and may be inapplicable to older chips.
19 #. If you are building LLVM/Clang on an ARM board with 1G of memory or less,
20 please use ``gold`` rather then GNU ``ld``.
21 Building LLVM/Clang with ``--enable-optimized``
22 is prefered since it consumes less memory. Otherwise, the building
23 process will very likely fail due to insufficient memory. In any
24 case it is probably a good idea to set up a swap partition.
26 #. If you want to run ``make
27 check-all`` after building LLVM/Clang, to avoid false alarms (eg, ARCMT
28 failure) please use at least the following configuration:
32 $ ../$LLVM_SRC_DIR/configure --with-abi=aapcs-vfp
34 #. The most popular linaro/ubuntu OS's for ARM boards, eg, the
35 Pandaboard, have become hard-float platforms. The following set
36 of configuration options appears to be a good choice for this
41 ./configure --build=armv7l-unknown-linux-gnueabihf
42 --host=armv7l-unknown-linux-gnueabihf
43 --target=armv7l-unknown-linux-gnueabihf --with-cpu=cortex-a9
44 --with-float=hard --with-abi=aapcs-vfp --with-fpu=neon
45 --enable-targets=arm --disable-optimized --enable-assertions