From f5c4671bfbad96bf346bd7e9a21fc4317b4959df Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sat, 3 Dec 2022 17:00:20 +0530 Subject: Adds most of the tools --- v_windows/v/old/vlib/sync/threads/threads.c.v | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 v_windows/v/old/vlib/sync/threads/threads.c.v (limited to 'v_windows/v/old/vlib/sync/threads/threads.c.v') diff --git a/v_windows/v/old/vlib/sync/threads/threads.c.v b/v_windows/v/old/vlib/sync/threads/threads.c.v new file mode 100644 index 0000000..02506c2 --- /dev/null +++ b/v_windows/v/old/vlib/sync/threads/threads.c.v @@ -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 +} -- cgit v1.2.3