mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
Makefile: Make $(LLVM) more flexible
Introduce a way for developers to easily switch between LLVM versions with LLVM=/path/to/llvm/ and LLVM=-version. This is a useful addition to the existing LLVM=1 variable which will select the first clang and llvm binutils available on the path. Reviewed-by: Anup Patel <anup@brainfault.org> Tested-by: Anup Patel <anup@brainfault.org> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Link: https://lore.kernel.org/r/20250430-improve_llvm_building-v1-1-caae96cc6be6@rivosinc.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
69a0f0245f
commit
27347f0902
12
README.md
12
README.md
@@ -252,6 +252,18 @@ option with:
|
||||
make LLVM=1
|
||||
```
|
||||
|
||||
To build with a specific version of LLVM, a path to a directory containing the
|
||||
LLVM tools can be provided:
|
||||
```
|
||||
make LLVM=/path/to/llvm/
|
||||
```
|
||||
|
||||
If you have versioned llvm tools you would like to use, such as `clang-17`, the LLVM variable can
|
||||
be set as:
|
||||
```
|
||||
make LLVM=-17
|
||||
```
|
||||
|
||||
When using Clang, *CROSS_COMPILE* often does not need to be defined unless
|
||||
using GNU binutils with prefixed binary names. *PLATFORM_RISCV_XLEN* will be
|
||||
used to infer a default triple to pass to Clang, so if *PLATFORM_RISCV_XLEN*
|
||||
|
Reference in New Issue
Block a user