Skip to content

Commit 7f280c5

Browse files
committed
[std] Don't break compilation for unknown CPUs
There's no point having a change in the final neko release like this that breaks compilation for platforms that worked fine before. Otherwise we'll get more PRs like #285. A warning should suffice.
1 parent dd7cb94 commit 7f280c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/std/sys.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ static value sys_is64() {
243243
<li>[arm64]</li>
244244
<li>[arm]</li>
245245
<li>[riscv64]</li>
246+
<li>[unknown]</li>
246247
</ul>
247248
</doc>
248249
**/
@@ -258,7 +259,8 @@ static value sys_cpu_arch() {
258259
#elif (defined(__riscv) && (__riscv_xlen == 64)) || defined(_M_RISCV64)
259260
return alloc_string("riscv64");
260261
#else
261-
#error Unknown CPU architecture
262+
#warning Unknown CPU architecture for sys_cpu_arch
263+
return alloc_string("unknown");
262264
#endif
263265
}
264266

0 commit comments

Comments
 (0)