Add RISCV CPU architecture support to build config
Remove assert statement from make_update.py, making it ready for any architecture. Add riscv 32, 64 and 128 bit cpu architecture with little/big endian to Blender's BLI_build_config.h and Libmv's build_config.h Tested (to compile) on riscv64 little endian machine. Pull Request: https://projects.blender.org/blender/blender/pulls/130920
This commit is contained in:
committed by
Sergey Sharybin
parent
9e28809695
commit
f662caf722
@@ -345,6 +345,23 @@
|
||||
# define ARCH_CPU_32_BITS 1
|
||||
# define ARCH_CPU_BIG_ENDIAN 1
|
||||
# endif
|
||||
#elif defined(__riscv)
|
||||
# define ARCH_CPU_RISCV_FAMILY 1
|
||||
# if defined(__LP128__)
|
||||
# define ARCH_CPU_RISCV128 1
|
||||
# define ARCH_CPU_128_BITS 1
|
||||
# elif defined(__LP64__)
|
||||
# define ARCH_CPU_RISCV64 1
|
||||
# define ARCH_CPU_64_BITS 1
|
||||
# else
|
||||
# define ARCH_CPU_RISCV32 1
|
||||
# define ARCH_CPU_32_BITS 1
|
||||
# endif
|
||||
# if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
# define ARCH_CPU_LITTLE_ENDIAN 1
|
||||
# else
|
||||
# define ARCH_CPU_BIG_ENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# error Please add support for your architecture in build/build_config.h
|
||||
#endif
|
||||
@@ -362,6 +379,9 @@
|
||||
#if !defined(ARCH_CPU_64_BITS)
|
||||
# define ARCH_CPU_64_BITS 0
|
||||
#endif
|
||||
#if !defined(ARCH_CPU_128_BITS)
|
||||
# define ARCH_CPU_128_BITS 0
|
||||
#endif
|
||||
|
||||
#if !defined(ARCH_CPU_X86_FAMILY)
|
||||
# define ARCH_CPU_X86_FAMILY 0
|
||||
@@ -378,5 +398,8 @@
|
||||
#if !defined(ARCH_CPU_S390_FAMILY)
|
||||
# define ARCH_CPU_S390_FAMILY 0
|
||||
#endif
|
||||
#if !defined(ARCH_CPU_RISCV_FAMILY)
|
||||
# define ARCH_CPU_RISCV_FAMILY 0
|
||||
#endif
|
||||
|
||||
#endif // LIBMV_BUILD_BUILD_CONFIG_H_
|
||||
|
||||
Reference in New Issue
Block a user