compiler: use -lpthread during building v itself.
parent
27644333a8
commit
7a4f26ac4f
|
@ -292,7 +292,7 @@ jobs:
|
|||
- name: v.c can be compiled and run
|
||||
run: |
|
||||
./v -os cross -o /tmp/v.c cmd/v
|
||||
gcc -g -std=gnu11 -w -o v_from_vc /tmp/v.c -lm
|
||||
gcc -g -std=gnu11 -w -o v_from_vc /tmp/v.c -lm -lpthread
|
||||
ls -lart v_from_vc
|
||||
./v_from_vc version
|
||||
- name: v_win.c can be compiled and run
|
||||
|
|
2
Makefile
2
Makefile
|
@ -48,7 +48,7 @@ ifdef WIN32
|
|||
$(CC) $(CFLAGS) -g -std=c99 -municode -w -o v.exe $(TMPVC)/$(VCFILE) $(LDFLAGS)
|
||||
./v.exe self
|
||||
else
|
||||
$(CC) $(CFLAGS) -g -std=gnu11 -w -o v $(TMPVC)/$(VCFILE) $(LDFLAGS) -lm
|
||||
$(CC) $(CFLAGS) -g -std=gnu11 -w -o v $(TMPVC)/$(VCFILE) $(LDFLAGS) -lm -lpthread
|
||||
ifdef ANDROID
|
||||
chmod 755 v
|
||||
endif
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
// that can be found in the LICENSE file.
|
||||
module sync
|
||||
|
||||
#flag -lpthread
|
||||
|
||||
// [init_with=new_mutex] // TODO: implement support for this struct attribute, and disallow Mutex{} from outside the sync.new_mutex() function.
|
||||
[ref_only]
|
||||
pub struct Mutex {
|
||||
|
|
|
@ -192,6 +192,11 @@ pub fn parse_files(paths []string, table &table.Table, pref &pref.Preferences, g
|
|||
return q.parsed_ast_files
|
||||
}
|
||||
}
|
||||
if false {
|
||||
// TODO: remove this; it just prevents warnings about unused time and runtime
|
||||
time.sleep_ms(1)
|
||||
println(runtime.nr_cpus())
|
||||
}
|
||||
// ///////////////
|
||||
mut files := []ast.File{}
|
||||
for path in paths {
|
||||
|
|
Loading…
Reference in New Issue