mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
OpenBSD: support Boehm-GC, X11 and Sqlite (#10300)
This commit is contained in:
parent
14d09aa7c2
commit
ce3e71cb8e
@ -8,18 +8,26 @@ $if static_boehm ? {
|
|||||||
#flag $first_existing("/opt/homebrew/lib/libgc.a", "/usr/local/lib/libgc.a")
|
#flag $first_existing("/opt/homebrew/lib/libgc.a", "/usr/local/lib/libgc.a")
|
||||||
} $else $if linux {
|
} $else $if linux {
|
||||||
#flag -l:libgc.a
|
#flag -l:libgc.a
|
||||||
|
} $else $if openbsd {
|
||||||
|
#flag -I/usr/local/include
|
||||||
|
#flag /usr/local/lib/libgc.a
|
||||||
|
#flag -lpthread
|
||||||
} $else {
|
} $else {
|
||||||
#flag -lgc
|
#flag -lgc
|
||||||
}
|
}
|
||||||
} $else {
|
} $else {
|
||||||
$if macos {
|
$if macos {
|
||||||
#pkgconfig bdw-gc
|
#pkgconfig bdw-gc
|
||||||
|
} $else $if openbsd || freebsd {
|
||||||
|
#flag -I/usr/local/include
|
||||||
|
#flag -L/usr/local/lib
|
||||||
}
|
}
|
||||||
$if windows {
|
$if windows {
|
||||||
#flag -I@VEXEROOT/thirdparty/libgc/include
|
#flag -I@VEXEROOT/thirdparty/libgc/include
|
||||||
#flag -L@VEXEROOT/thirdparty/libgc
|
#flag -L@VEXEROOT/thirdparty/libgc
|
||||||
|
} $else {
|
||||||
|
#flag -lgc
|
||||||
}
|
}
|
||||||
#flag -lgc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$if gcboehm_leak ? {
|
$if gcboehm_leak ? {
|
||||||
|
@ -85,7 +85,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
|
|||||||
$if no_backtrace ? {
|
$if no_backtrace ? {
|
||||||
return false
|
return false
|
||||||
} $else {
|
} $else {
|
||||||
$if !freestanding {
|
$if linux && !freestanding {
|
||||||
$if tinyc {
|
$if tinyc {
|
||||||
C.tcc_backtrace(c'Backtrace')
|
C.tcc_backtrace(c'Backtrace')
|
||||||
return false
|
return false
|
||||||
|
@ -6,9 +6,15 @@ import time
|
|||||||
import sync
|
import sync
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
$if freebsd {
|
||||||
|
#flag -I/usr/local/include
|
||||||
|
#flag -L/usr/local/lib
|
||||||
|
} $else $if openbsd {
|
||||||
|
#flag -I/usr/X11R6/include
|
||||||
|
#flag -L/usr/X11R6/lib
|
||||||
|
}
|
||||||
#flag -lX11
|
#flag -lX11
|
||||||
#flag freebsd -I/usr/local/include
|
|
||||||
#flag freebsd -L/usr/local/lib -lX11
|
|
||||||
#include <X11/Xlib.h> # Please install a package with the X11 development headers, for example: `apt-get install libx11-dev`
|
#include <X11/Xlib.h> # Please install a package with the X11 development headers, for example: `apt-get install libx11-dev`
|
||||||
// X11
|
// X11
|
||||||
[typedef]
|
[typedef]
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
module sqlite
|
module sqlite
|
||||||
|
|
||||||
#flag darwin -lsqlite3
|
$if freebsd || openbsd {
|
||||||
#flag linux -lsqlite3
|
#flag -I/usr/local/include
|
||||||
#flag solaris -lsqlite3
|
#flag -L/usr/local/lib
|
||||||
#flag freebsd -I/usr/local/include
|
}
|
||||||
#flag freebsd -Wl -L/usr/local/lib -lsqlite3
|
$if windows {
|
||||||
#flag windows -I@VEXEROOT/thirdparty/sqlite
|
#flag windows -I@VEXEROOT/thirdparty/sqlite
|
||||||
#flag windows -L@VEXEROOT/thirdparty/sqlite
|
#flag windows -L@VEXEROOT/thirdparty/sqlite
|
||||||
#flag windows @VEXEROOT/thirdparty/sqlite/sqlite3.o
|
#flag windows @VEXEROOT/thirdparty/sqlite/sqlite3.o
|
||||||
// #flag linux -I @VEXEROOT/thirdparty/sqlite
|
} $else {
|
||||||
// #flag @VEXEROOT/thirdparty/sqlite/sqlite.c
|
#flag -lsqlite3
|
||||||
|
}
|
||||||
|
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
//
|
|
||||||
struct C.sqlite3 {
|
struct C.sqlite3 {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user