From 748b1b123d1b14c07c5cdd32500759ea3fa74741 Mon Sep 17 00:00:00 2001 From: Shi Pujin Date: Tue, 1 Aug 2023 15:13:34 +0800 Subject: [PATCH 1/4] add loongarch support Signed-off-by: Shi Pujin --- ipc/chromium/src/build/build_config.h | 3 +++ third_party/libwebrtc/build/build_config.h | 4 ++++ toolkit/moz.configure | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h index de26701b2d..76f74de83f 100644 --- a/ipc/chromium/src/build/build_config.h +++ b/ipc/chromium/src/build/build_config.h @@ -125,6 +125,9 @@ #elif defined(__riscv) && __riscv_xlen == 64 # define ARCH_CPU_RISCV64 1 # define ARCH_CPU_64_BITS 1 +#elif defined(__loongarch_lp64) +# define ARCH_CPU_LOONGARCH64 1 +# define ARCH_CPU_64_BITS 1 #else # error Please add support for your architecture in build/build_config.h #endif diff --git a/third_party/libwebrtc/build/build_config.h b/third_party/libwebrtc/build/build_config.h index e312ec52a4..1d0a7bbefb 100644 --- a/third_party/libwebrtc/build/build_config.h +++ b/third_party/libwebrtc/build/build_config.h @@ -206,6 +206,10 @@ #define ARCH_CPU_SPARC 1 #define ARCH_CPU_32_BITS 1 #define ARCH_CPU_BIG_ENDIAN 1 +#elif defined(__loongarch_lp64) +#define ARCH_CPU_LOONGARCH64 1 +#define ARCH_CPU_64_BITS 1 +#define ARCH_CPU_LITTLE_ENDIAN 1 #else #error Please add support for your architecture in build/build_config.h #endif diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 3304806289..2126789496 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -2187,7 +2187,7 @@ with only_when(compile_environment | artifact_builds): flac_only = True elif target.cpu == "x86_64": flags = ["-D__x86_64__", "-DPIC", "-DELF", "-Pconfig_unix64.asm"] - elif target.cpu in ("x86", "arm", "aarch64"): + elif target.cpu in ("x86", "arm", "aarch64", "loongarch64"): flac_only = True else: enable = False -- 2.41.0