From bdd1a13230fd1cc49e54218e19178dbacfe6c4e8 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 12 Jun 2021 18:17:29 +0300 Subject: [PATCH] tools: fix workdir for fast.v --- cmd/tools/fast/fast.v | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cmd/tools/fast/fast.v b/cmd/tools/fast/fast.v index a75ae95209..2a5a7cf483 100644 --- a/cmd/tools/fast/fast.v +++ b/cmd/tools/fast/fast.v @@ -7,10 +7,15 @@ import time // TODO -usecache const voptions = ' -skip-unused -show-timings -stats ' +const exe = os.executable() + +const fast_dir = os.dir(exe) + +const vdir = @VEXEROOT + fn main() { - exe := os.executable() - fast_dir := os.dir(exe) - vdir := os.dir(os.dir(os.dir(fast_dir))) + dump(fast_dir) + dump(vdir) os.chdir(fast_dir) if !os.exists('$vdir/v') && !os.is_dir('$vdir/vlib') { println('fast.html generator needs to be located in `v/cmd/tools/fast`') @@ -42,11 +47,11 @@ fn main() { // exec('git checkout $commit') println(' Building vprod...') os.chdir(vdir) - exec('v -o $vdir/vprod -prod -prealloc cmd/v') + exec('$vdir/v -o $vdir/vprod -prod -prealloc cmd/v') // exec('v -o $vdir/vprod $vdir/cmd/v') // for faster debugging // cache vlib modules - exec('v wipe-cache') - // exec('v -o v2 -prod cmd/v') + exec('$vdir/v wipe-cache') + exec('$vdir/v -o v2 -prod cmd/v') // measure diff1 := measure('$vdir/vprod $voptions -o v.c cmd/v', 'v.c') mut tcc_path := 'tcc'