summaryrefslogtreecommitdiffstats
path: root/libs/llvm/patches/100-allow-arc-target.patch
blob: f9424675f6719a6621affda84e7510b72ae5ad91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Mon, 25 Nov 2024 22:34:54 +0100
Subject: [PATCH] cmake: recognise arc as a native target architecture

LLVM_NATIVE_ARCH is derived from the host triple, so an ARC host ends
up unmapped and the native target is left unset. Map it to the ARC
backend the same way the other architectures are mapped.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 llvm/cmake/config-ix.cmake | 2 ++
 1 file changed, 2 insertions(+)

--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -560,6 +560,8 @@ elseif (LLVM_NATIVE_ARCH MATCHES "aarch6
   set(LLVM_NATIVE_ARCH AArch64)
 elseif (LLVM_NATIVE_ARCH MATCHES "arm64")
   set(LLVM_NATIVE_ARCH AArch64)
+elseif (LLVM_NATIVE_ARCH MATCHES "arc")
+  set(LLVM_NATIVE_ARCH ARC)
 elseif (LLVM_NATIVE_ARCH MATCHES "arm")
   set(LLVM_NATIVE_ARCH ARM)
 elseif (LLVM_NATIVE_ARCH MATCHES "avr")