compiler: rename build to build_module

This commit is contained in:
Vitor Oliveira 2019-09-10 07:36:14 -07:00 committed by Alexander Medvednikov
parent cd47f09f86
commit edd8528049
4 changed files with 9 additions and 9 deletions

View file

@ -23,7 +23,7 @@ enum BuildMode {
embed_vlib
// `v -lib ~/v/os`
// build any module (generate os.o + os.vh)
build //TODO a better name would be smth like `.build_module` I think
build_module
}
const (
@ -238,7 +238,7 @@ fn (v mut V) compile() {
imports_json := v.table.imports.contains('json')
// TODO remove global UI hack
if v.os == .mac && ((v.pref.build_mode == .embed_vlib && v.table.imports.contains('ui')) ||
(v.pref.build_mode == .build && v.dir.contains('/ui'))) {
(v.pref.build_mode == .build_module && v.dir.contains('/ui'))) {
cgen.genln('id defaultFont = 0; // main.v')
}
// We need the cjson header for all the json decoding user will do in default mode
@ -576,7 +576,7 @@ fn (v mut V) add_v_files_to_compile() {
// TmpPath/vlib
// These were generated by vfmt
/*
if v.pref.build_mode == .default_mode || v.pref.build_mode == .build {
if v.pref.build_mode == .default_mode || v.pref.build_mode == .build_module {
module_path = '$ModPath/vlib/$mod_p'
}
*/
@ -600,7 +600,7 @@ fn (v mut V) add_v_files_to_compile() {
}
j++
// TODO remove this once imports work with .build
if v.pref.build_mode == .build && j >= len / 2{
if v.pref.build_mode == .build_module && j >= len / 2{
break
}
//println(fit)
@ -770,7 +770,7 @@ fn new_v(args[]string) &V {
for builtin in builtins {
mut f := '$vroot/vlib/builtin/$builtin'
// In default mode we use precompiled vlib.o, point to .vh files with signatures
if build_mode == .default_mode || build_mode == .build {
if build_mode == .default_mode || build_mode == .build_module {
//f = '$TmpPath/vlib/builtin/${builtin}h'
}
files << f