mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
compiler: rename build to build_module
This commit is contained in:
parent
cd47f09f86
commit
edd8528049
4 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue