mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builder: exclude LDFLAGS in .o builds (#15977)
This commit is contained in:
parent
87a364ff24
commit
58bf2838c0
@ -425,8 +425,8 @@ fn (v &Builder) all_args(ccoptions CcompilerOptions) []string {
|
|||||||
// building an (.o) object file, that will be linked later.
|
// building an (.o) object file, that will be linked later.
|
||||||
if v.pref.build_mode != .build_module {
|
if v.pref.build_mode != .build_module {
|
||||||
all << ccoptions.linker_flags
|
all << ccoptions.linker_flags
|
||||||
}
|
|
||||||
all << ccoptions.env_ldflags
|
all << ccoptions.env_ldflags
|
||||||
|
}
|
||||||
return all
|
return all
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +435,9 @@ fn (v &Builder) thirdparty_object_args(ccoptions CcompilerOptions, middle []stri
|
|||||||
all << ccoptions.env_cflags
|
all << ccoptions.env_cflags
|
||||||
all << ccoptions.args
|
all << ccoptions.args
|
||||||
all << middle
|
all << middle
|
||||||
all << ccoptions.env_ldflags
|
// NOTE do not append linker flags in .o build process,
|
||||||
|
// compilers are inconsistent about how they handle:
|
||||||
|
// all << ccoptions.env_ldflags
|
||||||
return all
|
return all
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user