Use -O1 for non-GNU linkers
auto merge of #10633 : cmr/rust/linker_opts, r=thestinger

r? @Luqmana