1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

msvc: unique names for pdb files, remove test job limit

This commit is contained in:
Emily Hudson
2020-06-26 16:16:15 +01:00
committed by GitHub
parent c83c5e7c61
commit 09236a438b
3 changed files with 10 additions and 11 deletions

View File

@ -200,6 +200,7 @@ pub fn (mut v Builder) cc_msvc() {
return
}
out_name_obj := os.real_path(v.out_name_c + '.obj')
out_name_pdb := os.real_path(v.out_name_c + '.pdb')
// Default arguments
// volatile:ms enables atomic volatile (gcc _Atomic)
// -w: no warnings
@ -209,12 +210,17 @@ pub fn (mut v Builder) cc_msvc() {
if v.pref.is_prod {
a << '/O2'
a << '/MD'
a << '/Zi'
a << '/DNDEBUG'
} else {
a << '/Zi'
a << '/MDd'
}
if v.pref.is_debug {
// /Zi generates a .pdb
// /Fd sets the pdb file name (so its not just vc140 all the time)
a << ['/Zi', '/Fd"$out_name_pdb"']
}
if v.pref.is_shared {
if !v.pref.out_name.ends_with('.dll') {
v.pref.out_name += '.dll'
@ -337,7 +343,7 @@ fn build_thirdparty_obj_file_with_msvc(path string, moduleflags []cflag.CFlag) {
// println('cfiles: $cfiles')
btarget := moduleflags.c_options_before_target_msvc()
atarget := moduleflags.c_options_after_target_msvc()
cmd := '"$msvc.full_cl_exe_path" /volatile:ms /Zi /DNDEBUG $include_string /c $btarget $cfiles $atarget /Fo"$obj_path"'
cmd := '"$msvc.full_cl_exe_path" /volatile:ms /DNDEBUG $include_string /c $btarget $cfiles $atarget /Fo"$obj_path"'
// NB: the quotes above ARE balanced.
println('thirdparty cmd line: $cmd')
res := os.exec(cmd) or {