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

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

This commit is contained in:
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

View File

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