mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: merge with filepath
This commit is contained in:
@ -1,9 +1,6 @@
|
||||
module compiler
|
||||
|
||||
import (
|
||||
os
|
||||
filepath
|
||||
)
|
||||
import os
|
||||
|
||||
#flag windows -l shell32
|
||||
#flag windows -l dbghelp
|
||||
@ -165,7 +162,7 @@ fn find_msvc() ?MsvcResult {
|
||||
return error('Unable to find visual studio')
|
||||
}
|
||||
return MsvcResult{
|
||||
full_cl_exe_path: os.realpath(vs.exe_path + filepath.separator + 'cl.exe')
|
||||
full_cl_exe_path: os.realpath(vs.exe_path + os.path_separator + 'cl.exe')
|
||||
exe_path: vs.exe_path
|
||||
um_lib_path: wk.um_lib_path
|
||||
ucrt_lib_path: wk.ucrt_lib_path
|
||||
@ -316,14 +313,14 @@ fn build_thirdparty_obj_file_with_msvc(path string, moduleflags []CFlag) {
|
||||
return
|
||||
}
|
||||
println('$obj_path not found, building it (with msvc)...')
|
||||
parent := filepath.dir(obj_path)
|
||||
parent := os.dir(obj_path)
|
||||
files := os.ls(parent)or{
|
||||
panic(err)
|
||||
}
|
||||
mut cfiles := ''
|
||||
for file in files {
|
||||
if file.ends_with('.c') {
|
||||
cfiles += '"' + os.realpath(parent + filepath.separator + file) + '" '
|
||||
cfiles += '"' + os.realpath(parent + os.path_separator + file) + '" '
|
||||
}
|
||||
}
|
||||
include_string := '-I "$msvc.ucrt_include_path" -I "$msvc.vs_include_path" -I "$msvc.um_include_path" -I "$msvc.shared_include_path"'
|
||||
@ -378,7 +375,7 @@ fn (cflags []CFlag) msvc_string_flags() MsvcStringFlags {
|
||||
}
|
||||
else if flag.name == '-L' {
|
||||
lib_paths << flag.value
|
||||
lib_paths << flag.value + filepath.separator + 'msvc'
|
||||
lib_paths << flag.value + os.path_separator + 'msvc'
|
||||
// The above allows putting msvc specific .lib files in a subfolder msvc/ ,
|
||||
// where gcc will NOT find them, but cl will do...
|
||||
// NB: gcc is smart enough to not need .lib files at all in most cases, the .dll is enough.
|
||||
|
Reference in New Issue
Block a user