no longer download vlib if it's missing

pull/2293/head
Alexander Medvednikov 2019-10-10 23:20:41 +03:00
parent e1dd4c19b5
commit e7e0514379
2 changed files with 6 additions and 6 deletions

View File

@ -55,6 +55,7 @@ jobs:
VFLAGS: -cc tcc VFLAGS: -cc tcc
run: | run: |
tcc -version tcc -version
./v -o v2 compiler # Make sure vtcc can build itself
./v test v ./v test v
build-windows-gcc: build-windows-gcc:

View File

@ -857,24 +857,23 @@ fn new_v(args[]string) &V {
case 'solaris': _os = .solaris case 'solaris': _os = .solaris
} }
} }
//println('OS=$_os')
// Location of all vlib files // Location of all vlib files
vroot := os.dir(os.executable()) vroot := os.dir(os.executable())
//println('VROOT=$vroot') //println('VROOT=$vroot')
// v.exe's parent directory should contain vlib // v.exe's parent directory should contain vlib
if !os.dir_exists(vroot) || !os.dir_exists(vroot + '/vlib/builtin') { if !os.dir_exists(vroot) || !os.dir_exists(vroot + '/vlib/builtin') {
println('vlib not found, downloading it...') println('vlib not found, downloading it...')
/*
ret := os.system('git clone --depth=1 https://github.com/vlang/v .') ret := os.system('git clone --depth=1 https://github.com/vlang/v .')
if ret != 0 { if ret != 0 {
println('failed to `git clone` vlib') println('failed to `git clone` vlib')
println('make sure you are online and have git installed') println('make sure you are online and have git installed')
exit(1) exit(1)
} }
*/
//println('vlib not found. It should be next to the V executable. ') println('vlib not found. It should be next to the V executable. ')
//println('Go to https://vlang.io to install V.') println('Go to https://vlang.io to install V.')
//exit(1) exit(1)
} }
//println('out_name:$out_name') //println('out_name:$out_name')
mut out_name_c := os.realpath('${out_name}.tmp.c') mut out_name_c := os.realpath('${out_name}.tmp.c')