mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib: add Android checks to build V on Android
This commit is contained in:
parent
a45895a3af
commit
9158ba4640
@ -27,6 +27,8 @@ pub fn print_backtrace_skipping_top_frames(skipframes int) {
|
||||
return
|
||||
}
|
||||
$if linux {
|
||||
$if !android {
|
||||
// backtrace is not available on Android.
|
||||
if C.backtrace_symbols_fd != 0 {
|
||||
buffer := [100]byteptr
|
||||
nr_ptrs := C.backtrace(*voidptr(buffer), 100)
|
||||
@ -37,6 +39,7 @@ pub fn print_backtrace_skipping_top_frames(skipframes int) {
|
||||
C.printf('Some libc implementations like musl simply do not provide it.\n')
|
||||
}
|
||||
}
|
||||
}
|
||||
println('print_backtrace_skipping_top_frames is not implemented on this platform for now...\n')
|
||||
}
|
||||
pub fn print_backtrace(){
|
||||
|
@ -539,6 +539,9 @@ pub fn user_os() string {
|
||||
$if msvc {
|
||||
return 'windows'
|
||||
}
|
||||
$if android{
|
||||
return 'android'
|
||||
}
|
||||
return 'unknown'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user