cmd/link: nicer error when trying to link an invalid .syso file built on another OS #23278
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I did, on linux,
go build .
on a project firstly created on Windows, containing amain.go
file but also aresource.syso
file generated with winres, that contains my icon file for the windows executable. The build was from linux this time, targeting linux, so i didn't pay attention to the .syso file.What did you expect to see?
A working build
What did you see instead?
go build .
dropped this error :It took me like 1 hour to think that
go build
was trying to include the .syso file even when i was on linux, and was crashing the build because of this, i didn't really pay attention to the command as it was issued by a script.go build should ignore .syso file on systems other than windows, or (i don't know if .syso is a windows-only extension) display a more readable error
The text was updated successfully, but these errors were encountered: