v.pref: update os_from_string, add missing qnx, remove deprecated wasm options that used - instead of _ (#21390)

This commit is contained in:
Turiiya 2024-04-30 19:38:13 +02:00 committed by GitHub
parent 7977e73e4b
commit 0cd3cf5a96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,6 +86,9 @@ pub fn os_from_string(os_str string) !OS {
'serenity' {
return .serenity
}
'qnx' {
return .qnx
}
'plan9' {
return .plan9
}
@ -122,18 +125,6 @@ pub fn os_from_string(os_str string) !OS {
return .wasi
}
else {
// handle deprecated names:
match os_str {
'wasm32-emscripten' {
eprintln('Please use `-os wasm32_emscripten` instead.')
return .wasm32_emscripten
}
'wasm32-wasi' {
eprintln('Please use `-os wasm32_wasi` instead.')
return .wasm32_wasi
}
else {}
}
return error('bad OS ${os_str}')
}
}