From ef10c60270aa4650a946b6ca4d78b2188314b54b Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 14 Mar 2021 21:34:51 +0300 Subject: [PATCH] tools/fast: fix freebsd path --- cmd/tools/fast/fast.v | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/tools/fast/fast.v b/cmd/tools/fast/fast.v index 532bb4586e..701ca88774 100644 --- a/cmd/tools/fast/fast.v +++ b/cmd/tools/fast/fast.v @@ -39,7 +39,11 @@ fn main() { println(' Building vprod...') exec('v -o $vdir/vprod -prod $vdir/cmd/v') diff1 := measure('$vdir/vprod -cc clang -o v.c -show-timings $vdir/cmd/v', 'v.c') - diff2 := measure('$vdir/vprod -cc tcc -o v2 $vdir/cmd/v', 'v2') + mut tcc_path := 'tcc' + $if freebsd { + tcc_path = '/usr/local/bin/tcc' + } + diff2 := measure('$vdir/vprod -cc $tcc_path -o v2 $vdir/cmd/v', 'v2') diff3 := 0 // measure('$vdir/vprod -x64 $vdir/cmd/tools/1mil.v', 'x64 1mil') diff4 := measure('$vdir/vprod -cc clang $vdir/examples/hello_world.v', 'hello.v') vc_size := os.file_size('v.c') / 1000