compiler: v.v fixes
parent
387e56e215
commit
e2bca190a9
|
@ -496,9 +496,9 @@ pub fn (v V) run_compiled_executable_and_exit() {
|
|||
pub fn (v &V) v_files_from_dir(dir string) []string {
|
||||
mut res := []string
|
||||
if !os.file_exists(dir) {
|
||||
verror('$dir doesn\'t exist')
|
||||
verror("$dir doesn't exist!")
|
||||
} else if !os.dir_exists(dir) {
|
||||
verror('$dir isn\'t a directory')
|
||||
verror("$dir isn't a directory")
|
||||
}
|
||||
mut files := os.ls(dir)
|
||||
if v.pref.is_verbose {
|
||||
|
@ -600,7 +600,6 @@ pub fn (v mut V) add_v_files_to_compile() {
|
|||
|
||||
pub fn (v &V) get_builtin_files() []string {
|
||||
// .vh cache exists? Use it
|
||||
|
||||
$if js {
|
||||
return v.v_files_from_dir('$v.vroot${os.path_separator}vlib${os.path_separator}builtin${os.path_separator}js')
|
||||
}
|
||||
|
|
|
@ -131,13 +131,13 @@ pub fn v_test_v(args_before_test string){
|
|||
println('vlib/ is missing, it must be next to the V executable')
|
||||
exit(1)
|
||||
}
|
||||
if !os.dir_exists(parent_dir + '/compiler') {
|
||||
println('compiler/ is missing, it must be next to the V executable')
|
||||
if !os.file_exists(parent_dir + '/v.v') {
|
||||
println('v.v is missing, it must be next to the V executable')
|
||||
exit(1)
|
||||
}
|
||||
// Make sure v.c can be compiled without warnings
|
||||
$if mac {
|
||||
os.system('$vexe -o v.c compiler')
|
||||
os.system('$vexe -o v.c v.v')
|
||||
if os.system('cc -Werror v.c') != 0 {
|
||||
println('cc failed to build v.c without warnings')
|
||||
exit(1)
|
||||
|
|
Loading…
Reference in New Issue