@@ -6,6 +6,7 @@ import time
6
6
import arrays
7
7
import log
8
8
9
+ const args = arguments ()
9
10
const warmup_samples = 2
10
11
11
12
const max_samples = 20
@@ -54,7 +55,7 @@ fn main() {
54
55
if vdir.contains ('/tmp/cirrus-ci-build' ) {
55
56
ccompiler_path = 'clang'
56
57
}
57
- if os. args.contains ('-clang' ) {
58
+ if args.contains ('-clang' ) {
58
59
ccompiler_path = 'clang'
59
60
}
60
61
elog ('fast_dir: ${fast_dir} | vdir: ${vdir} | compiler: ${ccompiler_path} ' )
@@ -68,7 +69,7 @@ fn main() {
68
69
os.create ('table.html' )!
69
70
}
70
71
71
- if ! os. args.contains ('-noupdate' ) {
72
+ if ! args.contains ('-noupdate' ) {
72
73
elog ('Fetching updates...' )
73
74
ret := lsystem ('${vdir} /v up' )
74
75
if ret != 0 {
@@ -83,7 +84,7 @@ fn main() {
83
84
uploaded_index := os.read_file ('fast.vlang.io/index.html' )!
84
85
if uploaded_index.contains ('>${commit} <' ) {
85
86
elog ('NOTE: commit ${commit} had been benchmarked already.' )
86
- if ! os. args.contains ('-force' ) {
87
+ if ! args.contains ('-force' ) {
87
88
elog ('nothing more to do' )
88
89
return
89
90
}
@@ -98,21 +99,21 @@ fn main() {
98
99
elog ('Benchmarking commit ${commit} , with commit message: "${message} ", commit_date: ${commit_date} , date: ${date} ' )
99
100
100
101
// build an optimized V
101
- if os. args.contains ('-do-not-rebuild-vprod' ) {
102
+ if args.contains ('-do-not-rebuild-vprod' ) {
102
103
if ! os.exists ('vprod' ) {
103
104
elog ('Exiting, since if you use `-do-not-rebuild-vprod`, you should already have a `${vdir} /vprod` executable, but it is missing!' )
104
105
return
105
106
}
106
107
} else {
107
108
elog (' Building vprod...' )
108
- if os. args.contains ('-noprod' ) {
109
+ if args.contains ('-noprod' ) {
109
110
lexec ('./v -o vprod cmd/v' ) // for faster debugging
110
111
} else {
111
112
lexec ('./v -o vprod -prod -prealloc cmd/v' )
112
113
}
113
114
}
114
115
115
- if ! os. args.contains ('-do-not-rebuild-caches' ) {
116
+ if ! args.contains ('-do-not-rebuild-caches' ) {
116
117
elog ('clearing caches...' )
117
118
// cache vlib modules
118
119
lexec ('${vdir} /v wipe-cache' )
@@ -163,7 +164,7 @@ fn main() {
163
164
res.close ()
164
165
165
166
// upload the result to github pages
166
- if os. args.contains ('-upload' ) {
167
+ if args.contains ('-upload' ) {
167
168
$if freebsd {
168
169
// Note: tcc currently can not compile vpm on FreeBSD, due to its dependence on net.ssl and net.mbedtls, so force using clang instead:
169
170
elog ('FreeBSD: compiling the VPM tool with clang...' )
0 commit comments