mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
serenity: add more support
This commit is contained in:
@@ -21,8 +21,7 @@ const int_max = int(0x7FFFFFFF)
|
||||
const (
|
||||
valid_comp_if_os = ['windows', 'ios', 'macos', 'mach', 'darwin', 'hpux', 'gnu',
|
||||
'qnx', 'linux', 'freebsd', 'openbsd', 'netbsd', 'bsd', 'dragonfly', 'android', 'solaris',
|
||||
'haiku',
|
||||
]
|
||||
'haiku', 'serenity']
|
||||
valid_comp_if_compilers = ['gcc', 'tinyc', 'clang', 'mingw', 'msvc', 'cplusplus']
|
||||
valid_comp_if_platforms = ['amd64', 'i386', 'aarch64', 'arm64', 'arm32', 'rv64', 'rv32']
|
||||
valid_comp_if_cpu_features = ['x64', 'x32', 'little_endian', 'big_endian']
|
||||
|
@@ -40,7 +40,9 @@ pub enum Platform {
|
||||
js // for interoperability in prefs.OS
|
||||
android
|
||||
solaris
|
||||
serenity
|
||||
haiku
|
||||
raw
|
||||
cross // TODO: add functionality for v doc -os cross whenever possible
|
||||
}
|
||||
|
||||
@@ -58,6 +60,7 @@ pub fn platform_from_string(platform_str string) ?Platform {
|
||||
'dragonfly' { return .dragonfly }
|
||||
'js' { return .js }
|
||||
'solaris' { return .solaris }
|
||||
'serenity' { return .serenity }
|
||||
'android' { return .android }
|
||||
'haiku' { return .haiku }
|
||||
'nix' { return .linux }
|
||||
|
@@ -59,7 +59,7 @@ pub fn (o OS) str() string {
|
||||
.js { return 'JavaScript' }
|
||||
.android { return 'Android' }
|
||||
.solaris { return 'Solaris' }
|
||||
.serenity { return 'serenity' }
|
||||
.serenity { return 'SerenityOS' }
|
||||
.haiku { return 'Haiku' }
|
||||
.raw { return 'Raw' }
|
||||
.all { return 'all' }
|
||||
|
@@ -181,6 +181,9 @@ pub fn (prefs &Preferences) should_compile_c(file string) bool {
|
||||
if prefs.os != .solaris && file.ends_with('_solaris.c.v') {
|
||||
return false
|
||||
}
|
||||
if prefs.os != .serenity && file.ends_with('_serenity.c.v') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user