mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.builder: remove default link flags -lm, -ldl, -lpthread (use module specific link flags instead) (#10099)
This commit is contained in:
13
vlib/sync/threads/threads.c.v
Normal file
13
vlib/sync/threads/threads.c.v
Normal file
@ -0,0 +1,13 @@
|
||||
module threads
|
||||
|
||||
// This module adds the necessary compiler flags for using threads.
|
||||
// It is automatically imported by code that does `go func()` .
|
||||
// See vlib/v/parser/pratt.v, search for ast.GoExpr .
|
||||
// The goal is that programs, that do not use threads at all will not need
|
||||
// to link to -lpthread etc.
|
||||
// NB: on some platforms like Android, linking -lpthread is not needed too.
|
||||
// See https://stackoverflow.com/a/31277163/1904615
|
||||
|
||||
$if !windows && !android {
|
||||
#flag -lpthread
|
||||
}
|
Reference in New Issue
Block a user