mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen/builder: make unused-command-line-argument a warning & cgen module_built fix
This commit is contained in:
parent
fc251a653e
commit
dd27d0a2a3
@ -194,7 +194,7 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
||||
'-Wcast-qual', '-Wdate-time', '-Wduplicated-branches', '-Wduplicated-cond', '-Wformat=2', '-Winit-self',
|
||||
'-Winvalid-pch', '-Wjump-misses-init', '-Wlogical-op', '-Wmultichar', '-Wnested-externs', '-Wnull-dereference',
|
||||
'-Wpacked', '-Wpointer-arith', '-Wshadow', '-Wswitch-default', '-Wswitch-enum', '-Wno-unused-parameter',
|
||||
'-Wno-unknown-warning-option', '-Wno-format-nonliteral']
|
||||
'-Wno-unknown-warning-option', '-Wno-format-nonliteral', '-Wno-unused-command-line-argument']
|
||||
if v.pref.os == .ios {
|
||||
ccoptions.args << '-framework Foundation'
|
||||
ccoptions.args << '-framework UIKit'
|
||||
|
@ -144,12 +144,12 @@ pub fn cgen(files []ast.File, table &table.Table, pref &pref.Preferences) string
|
||||
if pref.build_mode == .build_module {
|
||||
// TODO: detect this properly for all cases
|
||||
// either get if from an earlier stage or use the lookup paths
|
||||
if pref.path.contains('vlib' + os.path_separator) {
|
||||
module_built = pref.path.after('vlib' + os.path_separator).replace(os.path_separator,
|
||||
'.')
|
||||
} else if pref.path.contains('.vmodules' + os.path_separator) {
|
||||
module_built = pref.path.after('.vmodules' + os.path_separator).replace(os.path_separator,
|
||||
'.')
|
||||
for dir_name in ['vlib', '.vmodules', 'modules'] {
|
||||
if pref.path.contains(dir_name + os.path_separator) {
|
||||
module_built = pref.path.after(dir_name + os.path_separator).replace(os.path_separator,
|
||||
'.')
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
mut timers_should_print := false
|
||||
|
Loading…
Reference in New Issue
Block a user