v.builder: harmonise the default settings of the different Windows compilers (#14314)

Ekopalypse 2022-05-06 18:28:13 +02:00 committed by Jef Roosens
parent cf97a8dbbf
commit f3f83e79ca
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 15 additions and 0 deletions

View File

@ -418,6 +418,21 @@ fn (v &Builder) all_args(ccoptions CcompilerOptions) []string {
}
all << ccoptions.args
all << ccoptions.o_args
$if windows {
// Adding default options for tcc, gcc and clang as done in msvc.v.
// This is done before pre_args is added so that it can be overwritten if needed.
// -Wl,-stack=16777216 == /F 16777216
// -Werror=implicit-function-declaration == /we4013
// /volatile:ms - there seems to be no equivalent,
// normally msvc should use /volatile:iso
// but it could have an impact on vinix if it is created with msvc.
if !ccoptions.is_cc_msvc {
all << '-Wl,-stack=16777216'
if !v.pref.is_cstrict {
all << '-Werror=implicit-function-declaration'
}
}
}
all << ccoptions.pre_args
all << ccoptions.source_args
all << ccoptions.post_args