123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- From 474b7d247a594c554e8ce7f2a8cc4b4167cc2e2d Mon Sep 17 00:00:00 2001
- From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
- Date: Tue, 6 Sep 2022 03:08:05 -0400
- Subject: [PATCH 22/68] third_party: dav1d: enable riscv64 build
- Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
- ---
- third_party/dav1d/BUILD.gn | 2 +
- .../dav1d/config/linux-noasm/riscv64/config.h | 40 +++++++++++++++++++
- third_party/dav1d/generate_configs.py | 1 +
- 3 files changed, 43 insertions(+)
- create mode 100644 third_party/dav1d/config/linux-noasm/riscv64/config.h
- diff --git a/third_party/dav1d/BUILD.gn b/third_party/dav1d/BUILD.gn
- index 933c8f2f566a..9522d4c9151b 100644
- --- a/third_party/dav1d/BUILD.gn
- +++ b/third_party/dav1d/BUILD.gn
- @@ -17,6 +17,8 @@ if (is_win) {
- assert(current_cpu == "x64" && (is_linux || is_chromeos),
- "Only Linux X64 MSAN is supported")
- platform_config_root = "config/linux-noasm/$current_cpu"
- +} else if (current_cpu == "riscv64") {
- + platform_config_root = "config/linux-noasm/$current_cpu"
- } else {
- # Linux configuration files seem to work on Mac, so just reuse them.
- platform_config_root = "config/linux/$current_cpu"
- diff --git a/third_party/dav1d/config/linux-noasm/riscv64/config.h b/third_party/dav1d/config/linux-noasm/riscv64/config.h
- new file mode 100644
- index 000000000000..04e9f42fc1ed
- --- /dev/null
- +++ b/third_party/dav1d/config/linux-noasm/riscv64/config.h
- @@ -0,0 +1,40 @@
- +/*
- + * Autogenerated by the Meson build system.
- + * Do not edit, your changes will be lost.
- + */
- +
- +#pragma once
- +
- +#define ARCH_AARCH64 0
- +
- +#define ARCH_ARM 0
- +
- +#define ARCH_PPC64LE 0
- +
- +#define ARCH_X86 0
- +
- +#define ARCH_X86_32 0
- +
- +#define ARCH_X86_64 0
- +
- +#define CONFIG_16BPC 1
- +
- +#define CONFIG_8BPC 1
- +
- +// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
- +
- +#define ENDIANNESS_BIG 0
- +
- +#define HAVE_ASM 0
- +
- +#define HAVE_CLOCK_GETTIME 1
- +
- +#define HAVE_DLSYM 1
- +
- +#define HAVE_POSIX_MEMALIGN 1
- +
- +// #define HAVE_PTHREAD_GETAFFINITY_NP 1 -- Controlled by Chomium
- +
- +#define HAVE_UNISTD_H 1
- +
- +// #define STACK_ALIGNMENT 32 -- Stack alignment is controlled by Chromium
- diff --git a/third_party/dav1d/generate_configs.py b/third_party/dav1d/generate_configs.py
- index ad5d693f87af..f99fc62a7021 100755
- --- a/third_party/dav1d/generate_configs.py
- +++ b/third_party/dav1d/generate_configs.py
- @@ -194,6 +194,7 @@ def main():
-
- GenerateConfig('config/linux/x64', linux_env)
- GenerateConfig('config/linux-noasm/x64', linux_env, ['-Denable_asm=false'])
- + GenerateConfig('config/linux-noasm/riscv64', linux_env, ['-Denable_asm=false'])
-
- GenerateConfig('config/linux/x86', linux_env,
- ['--cross-file', '../crossfiles/linux32.crossfile'])
- --
- 2.30.2
|