native: add comptime cpu archs support (#24956)

This commit is contained in:
kbkpbot 2025-07-23 19:33:19 +08:00 committed by GitHub
parent 1f11b2b99c
commit 735f8efb61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,9 +162,12 @@ fn (mut g Gen) comptime_ident(name string, is_comptime_option bool) bool {
'arm64' {
g.pref.arch == .arm64
}
'x86', 'x32' {
'x86', 'x32', 'i386', 'arm32', 'rv32' {
false // native only supports 64-bit systems
}
'rv64', 's390x', 'ppc64le', 'loongarch64' {
false // not support yet
}
'little_endian' {
true // all systems targeted by native should be little-endian
}