tools/clang/scripts: add RISCV as one of the target to build

Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
Bug: https://bugs.chromium.org/p/llvm/issues/detail?id=27
Change-Id: Ic170c65c934aac301f964472ad43aca26dece370
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3607571
Reviewed-by: Arthur Eubanks <aeubanks@google.com>
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Cr-Commit-Position: refs/heads/main@{#1001759}
NOKEYCHECK=True
GitOrigin-RevId: dd17a06a14bb4bc30fe8a6eda7aa699fa8498820
diff --git a/scripts/build.py b/scripts/build.py
index 174ddc9..c35e207 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -620,7 +620,7 @@
   cxxflags = []
   ldflags = []
 
-  targets = 'AArch64;ARM;Mips;PowerPC;SystemZ;WebAssembly;X86'
+  targets = 'AArch64;ARM;Mips;PowerPC;RISCV;SystemZ;WebAssembly;X86'
 
   projects = 'clang;compiler-rt;lld;clang-tools-extra'
 
@@ -983,6 +983,9 @@
     if platform.machine() == 'aarch64':
       cmake_args.append(
           '-DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-unknown-linux-gnu')
+    elif platform.machine() == 'riscv64':
+      cmake_args.append(
+          '-DLLVM_DEFAULT_TARGET_TRIPLE=riscv64-unknown-linux-gnu')
     else:
       cmake_args.append('-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu')
     cmake_args.append('-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON')
diff --git a/scripts/update.py b/scripts/update.py
index 3020034..1257fef 100755
--- a/scripts/update.py
+++ b/scripts/update.py
@@ -36,7 +36,7 @@
 # Reverting problematic clang rolls is safe, though.
 # This is the output of `git describe` and is usable as a commit-ish.
 CLANG_REVISION = 'llvmorg-15-init-9576-g75f9e83a'
-CLANG_SUB_REVISION = 2
+CLANG_SUB_REVISION = 3
 
 PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
 RELEASE_VERSION = '15.0.0'