-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathruntime.patch
26 lines (23 loc) · 1017 Bytes
/
runtime.patch
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
26
diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh
index 9a0e1f2b4..68d1ece3c 100644
--- a/eng/common/native/init-compiler.sh
+++ b/eng/common/native/init-compiler.sh
@@ -143,4 +143,9 @@ fi
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version" 2> /dev/null)"
+if [ "$build_arch" = "riscv64" ]; then
+ CC=/usr/bin/riscv64-linux-gnu-gcc
+ CXX=/usr/bin/riscv64-linux-gnu-g++
+fi
+
export CC CXX LDFLAGS SCAN_BUILD_COMMAND
diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt
index 23bdf3c26..f8302435a 100644
--- a/src/native/libs/CMakeLists.txt
+++ b/src/native/libs/CMakeLists.txt
@@ -115,6 +115,7 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
add_subdirectory(System.IO.Ports.Native)
endif ()
+ add_compile_options(-Wno-alloc-size-larger-than)
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Weverything)
add_compile_options(-Wno-format-nonliteral)