Fix #1370: Fail by default if there are linking errors

Also add a flag that allows to only warn if there are linking errors