[PATCH] D44153: Build system changes for RISCV

Azharuddin Mohammed via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 09:29:43 PDT 2018


azharudd added a comment.

In https://reviews.llvm.org/D44153#1031976, @asb wrote:

> Actually, looking again I'm not having any problems building just the RISCV backend even without this patch. e.g. an invocation like the following seems fine:
>
>   cmake -G Ninja -DCMAKE_BUILD_TYPE="Debug" \
>     -DBUILD_SHARED_LIBS=True -DLLVM_USE_SPLIT_DWARF=True \
>     -DLLVM_OPTIMIZED_TABLEGEN=True \
>     -DLLVM_BUILD_TESTS=True \
>     -DLLVM_TARGETS_TO_BUILD="RISCV" \
>     -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="RISCV" ../
>   cmake --build .
>   
>
> Could you please clarify exactly which build problems this fixes?


Alex, add -DLLVM_TARGET_ARCH=riscv32-unknown-linux-gnu to your cmake command above, and you'll hit the "Unknown architecture ..." error. Since we are cross-compiling, we'll need that option to default to riscv target arch. Without that option, it will target the host as the native arch.


Repository:
  rL LLVM

https://reviews.llvm.org/D44153





More information about the llvm-commits mailing list