mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: rename build to build_module
This commit is contained in:
parent
cd47f09f86
commit
edd8528049
@ -40,7 +40,7 @@ fn (v mut V) cc() {
|
||||
a << '-shared -fPIC '// -Wl,-z,defs'
|
||||
v.out_name = v.out_name + '.so'
|
||||
}
|
||||
if v.pref.build_mode == .build {
|
||||
if v.pref.build_mode == .build_module {
|
||||
v.out_name = ModPath + v.dir + '.o' //v.out_name
|
||||
println('Building ${v.out_name}...')
|
||||
}
|
||||
@ -64,7 +64,7 @@ fn (v mut V) cc() {
|
||||
}
|
||||
|
||||
mut libs := ''// builtin.o os.o http.o etc
|
||||
if v.pref.build_mode == .build {
|
||||
if v.pref.build_mode == .build_module {
|
||||
a << '-c'
|
||||
}
|
||||
else if v.pref.build_mode == .embed_vlib {
|
||||
|
@ -108,7 +108,7 @@ fn (f mut Fn) clear_vars() {
|
||||
|
||||
// vlib header file?
|
||||
fn (p mut Parser) is_sig() bool {
|
||||
return (p.pref.build_mode == .default_mode || p.pref.build_mode == .build) &&
|
||||
return (p.pref.build_mode == .default_mode || p.pref.build_mode == .build_module) &&
|
||||
(p.file_path.contains(ModPath))
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -249,7 +249,7 @@ pub fn (v mut V) cc_msvc() {
|
||||
v.out_name = os.realpath( v.out_name )
|
||||
|
||||
mut alibs := []string // builtin.o os.o http.o etc
|
||||
if v.pref.build_mode == .build {
|
||||
if v.pref.build_mode == .build_module {
|
||||
}
|
||||
else if v.pref.build_mode == .embed_vlib {
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user