From 233afde4cc21f34fa53798409890ebffa64e35fe Mon Sep 17 00:00:00 2001 From: Xiaotian Wu Date: Tue, 6 Oct 2020 22:42:43 +0800 Subject: add loongarch support --- docs/markdown/Reference-tables.md | 1 + mesonbuild/dependencies/cuda.py | 2 +- mesonbuild/envconfig.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index 806ba76..256aca4 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -89,6 +89,7 @@ set in the cross file. | dspic | 16 bit Microchip dsPIC | | e2k | MCST Elbrus processor | | ia64 | Itanium processor | +| loongarch64 | 64 bit Loongson processor| | m68k | Motorola 68000 processor | | microblaze | MicroBlaze processor | | mips | 32 bit MIPS processor | diff --git a/mesonbuild/dependencies/cuda.py b/mesonbuild/dependencies/cuda.py index c04e2fc..20f6569 100644 --- a/mesonbuild/dependencies/cuda.py +++ b/mesonbuild/dependencies/cuda.py @@ -219,7 +219,7 @@ class CudaDependency(ExternalDependency): raise DependencyException(msg.format(arch, 'Windows')) return os.path.join('lib', libdirs[arch]) elif machine.is_linux(): - libdirs = {'x86_64': 'lib64', 'ppc64': 'lib', 'aarch64': 'lib64'} + libdirs = {'x86_64': 'lib64', 'ppc64': 'lib', 'aarch64': 'lib64', 'loongarch64': 'lib64'} if arch not in libdirs: raise DependencyException(msg.format(arch, 'Linux')) return libdirs[arch] diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 6713135..ba35d16 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -45,6 +45,7 @@ known_cpu_families = ( 'dspic', 'e2k', 'ia64', + 'loongarch64', 'm68k', 'microblaze', 'mips', @@ -74,6 +75,7 @@ CPU_FAMILIES_64_BIT = [ 'aarch64', 'alpha', 'ia64', + 'loongarch64', 'mips64', 'ppc64', 'riscv64', -- cgit v1.1