compiler: fix for -Wl -Wa -Wp dont like spaces (#3091)

pull/3095/head
joe-conigliaro 2019-12-15 16:24:12 +11:00 committed by GitHub
parent 717740cfcf
commit f2c40bf49d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ fn (v &V) get_rest_of_module_cflags(c &CFlag) []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 { if cf.name in ['-l', '-Wa', '-Wl', '-Wp'] && value.len>0 {
return '${cf.name}${value}'.trim_space() return '${cf.name}${value}'.trim_space()
} }
// convert to absolute path // convert to absolute path
@ -74,7 +74,7 @@ fn (table mut Table) parse_cflag(cflag string, mod string) ?bool {
allowed_flags := [ allowed_flags := [
'framework', 'framework',
'library', 'library',
'Wl', 'Wa', 'Wl', 'Wp',
'I', 'l', 'L', 'I', 'l', 'L',
] ]
flag_orig := cflag.trim_space() flag_orig := cflag.trim_space()