v.builder: write an UTF8 BOM header for the .rsp file, when using '-cc msvc' (#22408)

This commit is contained in:
Delyan Angelov 2024-10-04 14:00:47 +03:00 committed by GitHub
parent 286c44266d
commit 0390c070ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -355,7 +355,7 @@ pub fn (mut v Builder) cc_msvc() {
a << env_ldflags
}
v.dump_c_options(a)
args := a.join(' ')
args := '\xEF\xBB\xBF' + a.join(' ')
// write args to a file so that we dont smash createprocess
os.write_file(out_name_cmd_line, args) or {
verror('Unable to write response file to "${out_name_cmd_line}"')