diff --git a/vlib/v/parser/comptime.v b/vlib/v/parser/comptime.v index 8d786cb4ee..2e74b296f8 100644 --- a/vlib/v/parser/comptime.v +++ b/vlib/v/parser/comptime.v @@ -252,64 +252,6 @@ fn (mut p Parser) at() ast.AtExpr { } } -// TODO import warning bug -const ( - todo_delete_me = pref.OS.linux -) - -fn os_from_string(os string) pref.OS { - match os { - 'linux' { - return .linux - } - 'windows' { - return .windows - } - 'ios' { - return .ios - } - 'macos' { - return .macos - } - 'freebsd' { - return .freebsd - } - 'openbsd' { - return .openbsd - } - 'netbsd' { - return .netbsd - } - 'dragonfly' { - return .dragonfly - } - 'js' { - return .js - } - 'solaris' { - return .solaris - } - 'android' { - return .android - } - 'msvc' { - // notice that `-os msvc` became `-cc msvc` - verror('use the flag `-cc msvc` to build using msvc') - } - 'haiku' { - return .haiku - } - 'linux_or_macos' { - return .linux - } - else { - panic('bad os $os') - } - } - // println('bad os $os') // todo panic? - return .linux -} - fn (mut p Parser) comptime_selector(left ast.Expr) ast.Expr { p.check(.dollar) mut has_parens := false diff --git a/vlib/v/util/util.v b/vlib/v/util/util.v index 06feeccec8..53ed4332b4 100644 --- a/vlib/v/util/util.v +++ b/vlib/v/util/util.v @@ -472,7 +472,9 @@ pub fn prepare_tool_when_needed(source_name string) { pub fn recompile_file(vexe string, file string) { cmd := '$vexe $file' - println('recompilation command: $cmd') + $if trace_recompilation ? { + println('recompilation command: $cmd') + } recompile_result := os.system(cmd) if recompile_result != 0 { eprintln('could not recompile $file')