compiler: pass -l flags without space (needed for tcc)

pull/1989/head
Delyan Angelov 2019-09-14 23:55:12 +03:00 committed by Alexander Medvednikov
parent 1a099c9284
commit 982a162fbf
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,9 @@ fn (v V) get_os_cflags() []CFlag {
// format flag // format flag
fn (cf &CFlag) format() string { fn (cf &CFlag) format() string {
mut value := cf.value mut value := cf.value
if cf.name == '-l' && value.len>0 {
return '${cf.name}${value}'.trim_space()
}
// convert to absolute path // convert to absolute path
if cf.name == '-I' || cf.name == '-L' || value.ends_with('.o') { if cf.name == '-I' || cf.name == '-L' || value.ends_with('.o') {
value = '"'+os.realpath(value)+'"' value = '"'+os.realpath(value)+'"'